Skip to content

Commit

Permalink
Update wibuapi_async.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zYxDevs authored Oct 23, 2023
1 parent 4b9478d commit ea711fd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions wibuapi/wibuapi_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@


class AsyncWibuAPI:
def __init__(self):
self.base_url = "https://wibu-api.eu.org/api"
self.deprecated_url = "https://api.wibu-api.eu.org/api"
def __init__(self, apikey=None):
self.base_url = "https://wibu-api.eu.org"
self.deprecated_url = "https://api.wibu-api.eu.org"
self.headers = {"x-wibu-key": apikey}

# Anime, Donghua, Hentai
async def lendrive(self, link: str):
try:
url = f"{self.base_url}/anime/lendrive?link={link}"
return await getwibu(url, timeout=15)
return await getwibu(url, headers=self.headers, timeout=15)
except Exception as e:
return f"ERROR: {str(e)}. Report to https://t.me/YBotsSupport"

Expand Down

0 comments on commit ea711fd

Please sign in to comment.