mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 09:02:44 +08:00
Fixed issue with movies on Addic7ed. #1550
This commit is contained in:
parent
8d698fa7e4
commit
6d082f8b38
1 changed files with 10 additions and 3 deletions
|
@ -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…
Reference in a new issue