Skip to content

Commit

Permalink
Remove cloud.mail.ru coz broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafitz Setya authored Aug 2, 2021
1 parent d87826d commit 0fb94cb
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions bot/helper/mirror_utils/download_utils/direct_link_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 """
Expand Down

0 comments on commit 0fb94cb

Please sign in to comment.