Penyesuaian api

This commit is contained in:
yasirarism 2023-09-12 22:08:31 +07:00 committed by GitHub
parent b0a5839e15
commit 9aac586b87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -204,10 +204,10 @@ async def fbdl(_, message):
try:
resjson = (await fetch.get(f"https://yasirapi.eu.org/fbdl?link={link}")).json()
try:
url = resjson["result"]["links"]["hd"].replace("&", "&")
except:
url = resjson["result"]["links"]["sd"].replace("&", "&")
obj = SmartDL(url, progress_bar=False, timeout=10)
url = resjson["result"]["hd"]
except KeyError:
url = resjson["result"]["sd"]
obj = SmartDL(url, progress_bar=False, timeout=15)
obj.start()
path = obj.get_dest()
await message.reply_video(