mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-22 05:51:10 +00:00
no log: one more fix for legendasdivx
This commit is contained in:
parent
eb63f05768
commit
b73c7866e0
1 changed files with 10 additions and 0 deletions
|
@ -343,6 +343,16 @@ class LegendasdivxProvider(Provider):
|
||||||
sleep(1)
|
sleep(1)
|
||||||
res = self.session.get(_searchurl.format(query=querytext))
|
res = self.session.get(_searchurl.format(query=querytext))
|
||||||
res.raise_for_status()
|
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:
|
except HTTPError as e:
|
||||||
if "bloqueado" in res.text.lower():
|
if "bloqueado" in res.text.lower():
|
||||||
logger.error("LegendasDivx.pt :: Your IP is blocked on this server.")
|
logger.error("LegendasDivx.pt :: Your IP is blocked on this server.")
|
||||||
|
|
Loading…
Reference in a new issue