summaryrefslogtreecommitdiffhomepage
path: root/custom_libs
diff options
context:
space:
mode:
authorHlib <[email protected]>2024-08-06 14:15:50 +0300
committerGitHub <[email protected]>2024-08-06 07:15:50 -0400
commit0fc334f731ddda1d70fb4b0ad6fc7c0329c76048 (patch)
treedba44fcee19a0c30132fa999b111bc168fafa2a5 /custom_libs
parent5582cc076dd58a63638d96cb0dbc5119554fe127 (diff)
downloadbazarr-0fc334f731ddda1d70fb4b0ad6fc7c0329c76048.tar.gz
bazarr-0fc334f731ddda1d70fb4b0ad6fc7c0329c76048.zip
Fixed AvistaZ and CinemaZ scraping when the Reseed notification is displayed
Diffstat (limited to 'custom_libs')
-rw-r--r--custom_libs/subliminal_patch/providers/avistaz_network.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/custom_libs/subliminal_patch/providers/avistaz_network.py b/custom_libs/subliminal_patch/providers/avistaz_network.py
index 2c5796ce3..30e68d047 100644
--- a/custom_libs/subliminal_patch/providers/avistaz_network.py
+++ b/custom_libs/subliminal_patch/providers/avistaz_network.py
@@ -5,7 +5,7 @@ from random import randint
import pycountry
from requests.cookies import RequestsCookieJar
-from subliminal.exceptions import AuthenticationError
+from subliminal.exceptions import AuthenticationError, ProviderError
from subliminal.providers import ParserBeautifulSoup
from subliminal_patch.http import RetryingCFSession
from subliminal_patch.pitcher import store_verification
@@ -354,7 +354,10 @@ class AvistazNetworkProviderBase(Provider):
def _parse_release_table(self, html):
release_data_table = (ParserBeautifulSoup(html, ['html.parser'])
- .select_one('#content-area > div:nth-child(4) > div.table-responsive > table > tbody'))
+ .select_one('#content-area > div.block > div.table-responsive > table > tbody'))
+
+ if release_data_table is None:
+ raise ProviderError('Unexpected HTML page layout - no release data table found')
rows = {}
for tr in release_data_table.find_all('tr', recursive=False):