mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 12:15:40 +01:00
tv4play: wrong user/passwd crashes the script.
exception handling cant handle unicode on py2
This commit is contained in:
parent
a32074dbbe
commit
260bd6c5c6
@ -204,7 +204,10 @@ class Tv4play(Service, OpenGraphThumbMixin):
|
||||
self.cookies = data.cookies
|
||||
fail = re.search("<p class='failed-login'>([^<]+)</p>", data.text)
|
||||
if fail:
|
||||
return ServiceError(fail.group(1))
|
||||
message = fail.group(1)
|
||||
if is_py2:
|
||||
message = message.encode("utf8")
|
||||
return ServiceError(message)
|
||||
return True
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user