mirror of
https://github.com/anasty17/mirror-leech-telegram-bot.git
synced 2025-01-08 12:07:33 +08:00
add support pcloud.
This commit is contained in:
parent
7c84d1333a
commit
caa816a096
@ -156,7 +156,7 @@ In each single file there is a major change from base code, it's almost totally
|
||||
- Extract these filetypes
|
||||
> ZIP, RAR, TAR, 7z, ISO, WIM, CAB, GZIP, BZIP2, APM, ARJ, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, LZH, LZMA, LZMA2, MBR, MSI, MSLZ, NSIS, NTFS, RPM, SquashFS, UDF, VHD, XAR, Z, TAR.XZ
|
||||
- Direct links Supported:
|
||||
> mediafire (file/folders), hxfile.co, streamtape.com, streamsb.net, streamhub.ink, streamvid.net, doodstream.com, feurl.com, upload.ee, pixeldrain.com, racaty.net, 1fichier.com, 1drv.ms (Only works for file not folder or business account), filelions.com, streamwish.com, send.cm (file/folders), solidfiles.com, linkbox.to (file/folders), shrdsk.me (sharedisk.io), akmfiles.com, wetransfer.com, gofile.io (file/folders), easyupload.io, mdisk.me (with ytdl), terabox.com (file/folders) (you need to add cookies txt with name) [terabox.txt](https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl).
|
||||
> mediafire (file/folders), hxfile.co, streamtape.com, streamsb.net, streamhub.ink, streamvid.net, doodstream.com, feurl.com, upload.ee, pixeldrain.com, racaty.net, 1fichier.com, 1drv.ms (Only works for file not folder or business account), filelions.com, streamwish.com, send.cm (file/folders), solidfiles.com, linkbox.to (file/folders), shrdsk.me (sharedisk.io), akmfiles.com, wetransfer.com, pcloud.link, gofile.io (file/folders), easyupload.io, mdisk.me (with ytdl), terabox.com (file/folders) (you need to add cookies txt with name) [terabox.txt](https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl).
|
||||
|
||||
# How to deploy?
|
||||
|
||||
|
@ -72,6 +72,8 @@ def direct_link_generator(link):
|
||||
return streamvid(link)
|
||||
elif "shrdsk.me" in domain:
|
||||
return shrdsk(link)
|
||||
elif "u.pcloud.link" in domain:
|
||||
return pcloud(link)
|
||||
elif any(x in domain for x in ["akmfiles.com", "akmfls.xyz"]):
|
||||
return akmfiles(link)
|
||||
elif any(
|
||||
@ -634,7 +636,7 @@ def filepress(url):
|
||||
"id": res2["data"],
|
||||
"method": "publicUserDownlaod",
|
||||
}
|
||||
api2 = f"https://new2.filepress.store/api/file/downlaod2/"
|
||||
api2 = "https://new2.filepress.store/api/file/downlaod2/"
|
||||
res = session.post(
|
||||
api2,
|
||||
headers={"Referer": f"{raw.scheme}://{raw.hostname}"},
|
||||
@ -1508,3 +1510,13 @@ def streamhub(url):
|
||||
if error := html.xpath('//div[@class="alert alert-danger"]/text()[2]'):
|
||||
raise DirectDownloadLinkException(f"ERROR: {error[0]}")
|
||||
raise DirectDownloadLinkException("ERROR: direct link not found!")
|
||||
|
||||
def pcloud(url):
|
||||
with create_scraper() as session:
|
||||
try:
|
||||
res = session.get(url)
|
||||
except Exception as e:
|
||||
raise DirectDownloadLinkException(f"ERROR: {e.__class__.__name__}")
|
||||
if link := findall(r'.downloadlink.:..(https:.*)..', res.text):
|
||||
return link[0].replace('\/', '/')
|
||||
raise DirectDownloadLinkException("ERROR: Direct link not found")
|
Loading…
Reference in New Issue
Block a user