This commit is contained in:
Hafitz Setya 2021-07-27 16:40:56 +07:00 committed by GitHub
parent f9af75f4ca
commit 8c6f37e800
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ 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:
elif 'cloud.mail.ru' in link:
return cm_ru(link)
elif 'mediafire.com' in link:
return mediafire(link)
@ -142,16 +142,16 @@ 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]
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}"
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")
raise DirectDownloadLinkException("Error: Can't extract the link\n")
return data["download"]
@ -225,7 +225,7 @@ def github(url: str) -> str:
def hxfile(url: str) -> str:
""" Hxfile direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
bypasser = lk21.Bypass()
dl_url=bypasser.bypass_filesIm(url)
return dl_url
@ -233,7 +233,7 @@ def hxfile(url: str) -> str:
def anonfiles(url: str) -> str:
""" Anonfiles direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
bypasser = lk21.Bypass()
dl_url=bypasser.bypass_anonfiles(url)
return dl_url
@ -241,7 +241,7 @@ def anonfiles(url: str) -> str:
def letsupload(url: str) -> str:
""" Letsupload direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
dl_url = ''
try:
link = re.findall(r'\bhttps?://.*letsupload\.io\S+', url)[0]
@ -254,7 +254,7 @@ def letsupload(url: str) -> str:
def fembed(link: str) -> str:
""" Fembed direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
bypasser = lk21.Bypass()
dl_url=bypasser.bypass_fembed(link)
lst_link = []
@ -266,7 +266,7 @@ def fembed(link: str) -> str:
def sbembed(link: str) -> str:
""" Sbembed direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
bypasser = lk21.Bypass()
dl_url=bypasser.bypass_sbembed(link)
lst_link = []
@ -306,7 +306,7 @@ def pixeldrain(url: str) -> str:
def antfiles(url: str) -> str:
""" Antfiles direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
bypasser = lk21.Bypass()
dl_url=bypasser.bypass_antfiles(url)
return dl_url
@ -314,7 +314,7 @@ def antfiles(url: str) -> str:
def streamtape(url: str) -> str:
""" Streamtape direct link generator
Based on https://github.com/breakdowns/slam-mirrorbot """
Based on https://github.com/breakdowns/slam-aria-mirror-bot """
bypasser = lk21.Bypass()
dl_url=bypasser.bypass_streamtape(url)
return dl_url
@ -322,7 +322,7 @@ def streamtape(url: str) -> str:
def racaty(url: str) -> str:
""" Racaty direct links generator
based on https://github.com/breakdowns/slam-mirrorbot """
based on https://github.com/breakdowns/slam-aria-mirror-bot """
dl_url = ''
try:
link = re.findall(r'\bhttps?://.*racaty\.net\S+', url)[0]
@ -342,7 +342,7 @@ def racaty(url: str) -> str:
def fichier(link: str) -> str:
""" 1Fichier direct links generator
Based on https://github.com/Maujar/updateref-16-7-21
https://github.com/breakdowns/slam-mirrorbot """
https://github.com/breakdowns/slam-aria-mirror-bot """
regex = r"^([http:\/\/|https:\/\/]+)?.*1fichier\.com\/\?.+"
gan = re.match(regex, link)
if not gan: