From 91101073b8c3f9fff8c2147a6756d989747a3d11 Mon Sep 17 00:00:00 2001 From: Halali Date: Thu, 23 Jan 2020 22:55:04 +0100 Subject: [PATCH 1/4] Possible fix for titulky provider --- libs/subliminal_patch/providers/titulky.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/subliminal_patch/providers/titulky.py b/libs/subliminal_patch/providers/titulky.py index b5e408d60..f337c46ee 100644 --- a/libs/subliminal_patch/providers/titulky.py +++ b/libs/subliminal_patch/providers/titulky.py @@ -244,7 +244,7 @@ class TitulkyProvider(Provider): for sub in subs: page_link = '%s%s' % (self.server_url, sub.a.get('href').encode('utf-8')) title = sub.find_all('td')[0:1] - title = [x.text.encode('utf-8') for x in title] + title = [x.text for x in title] version = sub.find(class_="fixedTip") if version is None: version = "" From 1801d2555bed74adbf3177b8ff92220e2066bb7b Mon Sep 17 00:00:00 2001 From: Space Date: Fri, 24 Jan 2020 12:06:18 +0200 Subject: [PATCH 2/4] #769 -fixed searching without imdbId --- libs/subliminal_patch/providers/titrari.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/subliminal_patch/providers/titrari.py b/libs/subliminal_patch/providers/titrari.py index fa02509fc..0ccf1a622 100644 --- a/libs/subliminal_patch/providers/titrari.py +++ b/libs/subliminal_patch/providers/titrari.py @@ -196,7 +196,12 @@ class TitrariProvider(Provider, ProviderSubtitleArchiveMixin): def list_subtitles(self, video, languages): title = fix_inconsistent_naming(video.title) - imdb_id = video.imdb_id[2:] + imdb_id = None + try: + imdb_id = video.imdb_id[2:] + except: + logger.error("[#### Provider: titrari.ro] Error parsing video.imdb_id.") + return [s for s in self.query(languages, title, imdb_id, video)] From e7d7ad408e6eefdcc9ab96b0024e5321ef02bcf2 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Sat, 25 Jan 2020 08:04:12 -0500 Subject: [PATCH 3/4] Update unix.py --- libs/tzlocal/unix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/tzlocal/unix.py b/libs/tzlocal/unix.py index 8574965a5..c62a03418 100644 --- a/libs/tzlocal/unix.py +++ b/libs/tzlocal/unix.py @@ -84,10 +84,11 @@ def _get_localzone(_root='/'): if not etctz: continue tz = pytz.timezone(etctz.replace(' ', '_')) - if _root == '/': + # Disabling this offset valdation due to issue with some timezone: https://github.com/regebro/tzlocal/issues/80 + # if _root == '/': # We are using a file in etc to name the timezone. # Verify that the timezone specified there is actually used: - utils.assert_tz_offset(tz) + # utils.assert_tz_offset(tz) return tz except IOError: From 57c24a6e56d31f016ccfd1965f3567cc3b3a6520 Mon Sep 17 00:00:00 2001 From: Halali Date: Mon, 27 Jan 2020 22:11:54 +0100 Subject: [PATCH 4/4] Another Possible fix for titulky provider --- libs/subliminal_patch/providers/titulky.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/subliminal_patch/providers/titulky.py b/libs/subliminal_patch/providers/titulky.py index f337c46ee..b462f923b 100644 --- a/libs/subliminal_patch/providers/titulky.py +++ b/libs/subliminal_patch/providers/titulky.py @@ -316,13 +316,12 @@ class TitulkyProvider(Provider): elif 'Limit vyčerpán' in r.text: raise DownloadLimitExceeded - soup = ParserBeautifulSoup(r.text.decode('utf-8', 'ignore'), ['lxml', 'html.parser']) + soup = ParserBeautifulSoup(r.text, ['lxml', 'html.parser']) # links = soup.find("a", {"id": "downlink"}).find_all('a') link = soup.find(id="downlink") # TODO: add settings for choice - url = link.get('href') - url = self.dn_url + url + url = self.dn_url + link.get('href') time.sleep(0.5) r = self.session.get(url, headers={'Referer': subtitle.download_link}, timeout=30)