This commit is contained in:
yasir 2023-01-17 17:21:40 +07:00
parent d9b352d4a4
commit e7a2ea4d06

View file

@ -101,7 +101,10 @@ def get_provider(url):
async def search_jw(movie_name: str, locale: str):
m_t_ = ""
response = (await http.get(f"https://yasirapi.eu.org/justwatch?q={movie_name}&locale={locale}")).json()
try:
response = (await http.get(f"https://yasirapi.eu.org/justwatch?q={movie_name}&locale={locale}")).json()
except:
return m_t_
if not response.get("results"):
LOGGER.error("JustWatch API Error or got Rate Limited.")
return m_t_