Remove cloud.mail.ru coz broken

This commit is contained in:
Hafitz Setya 2021-08-02 19:56:25 +07:00 committed by GitHub
parent d87826d6c0
commit 0fb94cb166
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,6 @@ def direct_link_generator(link: str):
return zippy_share(link)
elif 'yadi.sk' in link:
return yandex_disk(link)
elif 'cloud.mail.ru' in link:
return cm_ru(link)
elif 'mediafire.com' in link:
return mediafire(link)
elif 'uptobox.com' in link:
@ -140,23 +138,6 @@ def yandex_disk(url: str) -> str:
raise DirectDownloadLinkException("ERROR: File not found/Download limit reached\n")
def cm_ru(url: str) -> str:
"""cloud.mail.ru direct links generator
Using https://github.com/JrMasterModelBuilder/cmrudl.py"""
try:
link = re.findall(r'\bhttps?://.*cloud\.mail\.ru\S+', url)[0]
except IndexError:
raise DirectDownloadLinkException('No cloud.mail.ru links found\n')
command = f'vendor/cmrudl/cmrudl -s {link}'
result = popen(command).read()
result = result.splitlines()[-1]
try:
data = json.loads(result)
except json.decoder.JSONDecodeError:
raise DirectDownloadLinkException("Error: Can't extract the link\n")
return data["download"]
def uptobox(url: str) -> str:
""" Uptobox direct links generator
based on https://github.com/jovanzers/WinTenCermin """