mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 20:04:51 +00:00
Fix
This commit is contained in:
parent
2280700563
commit
d9b352d4a4
1 changed files with 3 additions and 6 deletions
|
|
@ -101,14 +101,11 @@ def get_provider(url):
|
||||||
|
|
||||||
async def search_jw(movie_name: str, locale: str):
|
async def search_jw(movie_name: str, locale: str):
|
||||||
m_t_ = ""
|
m_t_ = ""
|
||||||
try:
|
response = (await http.get(f"https://yasirapi.eu.org/justwatch?q={movie_name}&locale={locale}")).json()
|
||||||
response = await http.get(f"https://yasirapi.eu.org/justwatch?q={movie_name}&locale={locale}")
|
if not response.get("results"):
|
||||||
except Exception as err:
|
|
||||||
LOGGER.error("JustWatch API Error or got Rate Limited.")
|
LOGGER.error("JustWatch API Error or got Rate Limited.")
|
||||||
return m_t_
|
return m_t_
|
||||||
soup = json.loads(response.text)
|
for item in response.get("results")["items"]:
|
||||||
items = soup["items"]
|
|
||||||
for item in items:
|
|
||||||
if movie_name == item.get("title", ""):
|
if movie_name == item.get("title", ""):
|
||||||
offers = item.get("offers", [])
|
offers = item.get("offers", [])
|
||||||
t_m_ = []
|
t_m_ = []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue