1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-02-21 21:47:15 +00:00

no log: one more fix for legendasdivx

This commit is contained in:
morpheus65535 2022-03-14 10:43:42 -04:00
parent eb63f05768
commit b73c7866e0

View file

@ -343,6 +343,16 @@ class LegendasdivxProvider(Provider):
sleep(1)
res = self.session.get(_searchurl.format(query=querytext))
res.raise_for_status()
if res.status_code == 200 and "<!--pesquisas:" in res.text:
searches_count_groups = re.search(r'<!--pesquisas: (\d*)-->', res.text)
if searches_count_groups:
try:
searches_count = int(searches_count_groups.group(1))
except TypeError:
pass
else:
if searches_count >= self.SAFE_SEARCH_LIMIT:
searchLimitReached = True
except HTTPError as e:
if "bloqueado" in res.text.lower():
logger.error("LegendasDivx.pt :: Your IP is blocked on this server.")