Fixed issue with movies on Addic7ed. #1550

pull/1556/head v0.9.10-beta.4
morpheus65535 3 years ago
parent 8d698fa7e4
commit 6d082f8b38

@ -249,8 +249,12 @@ class Addic7edProvider(_Addic7edProvider):
for item in movies:
link = item.find('a', href=True)
if link:
type, media_id = link['href'].split('/')
if type == 'movie':
if link['href'].startswith('movie/'):
splitted_uri = link['href'].split('/')
if len(splitted_uri) == 2:
media_id = splitted_uri[1]
else:
continue
media_title = link.text
match = re.search(r'(.+)\s\((\d{4})\)$', media_title)
if match:
@ -492,7 +496,10 @@ class Addic7edProvider(_Addic7edProvider):
page_link = self.server_url + 'movie/' + movie_id
version_matches = re.search(r'Version\s(.+),.+', str(row1.contents[1].contents[1]))
version = version_matches.group(1) if version_matches else None
download_link = row2.contents[8].contents[2].attrs['href'][1:]
try:
download_link = row2.contents[8].contents[3].attrs['href'][1:]
except IndexError:
download_link = row2.contents[8].contents[2].attrs['href'][1:]
uploader = row1.contents[2].contents[8].text.strip()
# set subtitle language to hi if it's hearing_impaired

Loading…
Cancel
Save