From f1596ef7ba32127e09f9d22fee738de7d414ec76 Mon Sep 17 00:00:00 2001 From: Halali Date: Wed, 27 Nov 2019 23:32:58 +0100 Subject: [PATCH] Fix Titulky provider compatibility with Python3 --- libs/subliminal_patch/providers/titulky.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/subliminal_patch/providers/titulky.py b/libs/subliminal_patch/providers/titulky.py index 87b88e40f..b5e408d60 100644 --- a/libs/subliminal_patch/providers/titulky.py +++ b/libs/subliminal_patch/providers/titulky.py @@ -313,10 +313,10 @@ class TitulkyProvider(Provider): if not r.content: logger.debug('Unable to download subtitle. No data returned from provider') return - elif 'Limit vyčerpán' in r.content: + elif 'Limit vyčerpán' in r.text: raise DownloadLimitExceeded - soup = ParserBeautifulSoup(r.content.decode('utf-8', 'ignore'), ['lxml', 'html.parser']) + soup = ParserBeautifulSoup(r.text.decode('utf-8', 'ignore'), ['lxml', 'html.parser']) # links = soup.find("a", {"id": "downlink"}).find_all('a') link = soup.find(id="downlink") # TODO: add settings for choice