diff --git a/libs/subliminal_patch/providers/legendasdivx.py b/libs/subliminal_patch/providers/legendasdivx.py index d224f6a17..f965d7f9d 100644 --- a/libs/subliminal_patch/providers/legendasdivx.py +++ b/libs/subliminal_patch/providers/legendasdivx.py @@ -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 "', 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.")