diff options
author | Vitiko <[email protected]> | 2022-04-26 22:38:25 -0400 |
---|---|---|
committer | Vitiko <[email protected]> | 2022-04-26 22:38:25 -0400 |
commit | 9e2b2d8b00204fb1af170cc39e3c9092101205fe (patch) | |
tree | 8507518a180381e60dafdd217c162fdb9a6d53ac /libs | |
parent | 4e6fd61188cdee4d7065a4f27740ee23a66ce255 (diff) | |
download | bazarr-9e2b2d8b00204fb1af170cc39e3c9092101205fe.tar.gz bazarr-9e2b2d8b00204fb1af170cc39e3c9092101205fe.zip |
no log: update legendasdivx subtitle id property (again)
Diffstat (limited to 'libs')
-rw-r--r-- | libs/subliminal_patch/providers/legendasdivx.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/subliminal_patch/providers/legendasdivx.py b/libs/subliminal_patch/providers/legendasdivx.py index e808536f4..8a83d9b60 100644 --- a/libs/subliminal_patch/providers/legendasdivx.py +++ b/libs/subliminal_patch/providers/legendasdivx.py @@ -6,6 +6,7 @@ import re import zipfile from time import sleep from urllib.parse import quote +from urllib.parse import parse_qs from requests.exceptions import HTTPError import rarfile @@ -48,8 +49,8 @@ class LegendasdivxSubtitle(Subtitle): @property def id(self): try: - return self.page_link.split("=")[-1] - except IndexError: + return parse_qs(self.page_link)["lid"][0] + except (KeyError, IndexError): return f"legendasdivx_{self.video.imdb_id}_{self.release_info}_{self.uploader}" def get_matches(self, video): |