Add Solidfiles Direct Link Generator
This commit is contained in:
parent
e3f27cbb20
commit
48438f5357
|
|
@ -47,7 +47,7 @@ fembed.com, fembed.net, femax20.com, layarkacaxxi.icu, fcdn.stream,
|
|||
sbplay.org, naniplay.com, naniplay.nanime.in, naniplay.nanime.biz, sbembed.com,
|
||||
streamtape.com, streamsb.net, feurl.com, pixeldrain.com, racaty.net,
|
||||
1fichier.com, 1drv.ms (Only works for file not folder or business account),
|
||||
uptobox.com (Uptobox account must be premium)
|
||||
uptobox.com (Uptobox account must be premium), solidfiles.com
|
||||
```
|
||||
## From Original Repos
|
||||
- Mirroring direct download links, Torrent, and Telegram files to Google Drive
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ def direct_link_generator(link: str):
|
|||
return racaty(link)
|
||||
elif '1fichier.com' in link:
|
||||
return fichier(link)
|
||||
elif 'solidfiles.com' in link:
|
||||
return solidfiles(link)
|
||||
else:
|
||||
raise DirectDownloadLinkException(f'No Direct link function found for {link}')
|
||||
|
||||
|
|
@ -399,6 +401,18 @@ def fichier(link: str) -> str:
|
|||
else:
|
||||
raise DirectDownloadLinkException("ERROR: Error trying to generate Direct Link from 1fichier!")
|
||||
|
||||
def solidfiles(url: str) -> str:
|
||||
""" Solidfiles direct links generator
|
||||
Based on https://github.com/Xonshiz/SolidFiles-Downloader
|
||||
By https://github.com/Jusidama18 """
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36'
|
||||
}
|
||||
pageSource = requests.get(url, headers = headers).text
|
||||
mainOptions = str(re.search(r'viewerOptions\'\,\ (.*?)\)\;', pageSource).group(1))
|
||||
dl_url = json.loads(mainOptions)["downloadUrl"]
|
||||
return dl_url
|
||||
|
||||
|
||||
def useragent():
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue