From 7171635441617e9cc74a33f069dcf9668c45cebc Mon Sep 17 00:00:00 2001 From: Halali Date: Wed, 9 Oct 2019 22:06:30 +0200 Subject: [PATCH] Titulky provider some changes for python v3 compatibility --- libs/subliminal_patch/providers/titulky.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/subliminal_patch/providers/titulky.py b/libs/subliminal_patch/providers/titulky.py index 0bf806b13..87b88e40f 100644 --- a/libs/subliminal_patch/providers/titulky.py +++ b/libs/subliminal_patch/providers/titulky.py @@ -185,7 +185,7 @@ class TitulkyProvider(Provider): 'Password': self.password} r = self.session.post(self.server_url, data, allow_redirects=False, timeout=10) - if 'BadLogin' in r.content: + if 'BadLogin' in r.text: raise AuthenticationError(self.username) logger.debug('Logged in') @@ -259,9 +259,9 @@ class TitulkyProvider(Provider): langs = 'CZ' name = '%s (%s)' % (version, langs) - if ('CZ' in langs): + if b'CZ' in langs: language = Language('ces') - elif ('SK' in langs): + elif b'SK' in langs: language = Language('slk') # read the item # subtitle = self.subtitle_class(language, page_link, year, version, page_link.replace("detail", "dld"))