mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-27 10:07:22 +00:00
Fixed tvsubtitles provider #1354
This commit is contained in:
parent
cc80bd4be6
commit
1a025b693b
1 changed files with 5 additions and 0 deletions
|
@ -219,6 +219,11 @@ class TVsubtitlesProvider(Provider):
|
|||
r = self.session.get(self.server_url + 'download-%d.html' % subtitle.subtitle_id, timeout=10)
|
||||
r.raise_for_status()
|
||||
|
||||
# generate the download link from the sliced strings in the page source (js)
|
||||
download_link_part = re.findall(r'(?<=s\d\=\ \')(.*?)(?=\'\;)', r.text)
|
||||
r = self.session.get(self.server_url + ''.join(download_link_part), timeout=10)
|
||||
r.raise_for_status()
|
||||
|
||||
# open the zip
|
||||
with ZipFile(io.BytesIO(r.content)) as zf:
|
||||
if len(zf.namelist()) > 1:
|
||||
|
|
Loading…
Reference in a new issue