Switch codebase to use compat_b64decode

This commit is contained in:
Sergey M․ 2018-01-23 22:23:12 +07:00
parent 5d7d805ca9
commit cf2820710d
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
21 changed files with 70 additions and 65 deletions

View file

@ -2,9 +2,8 @@
from __future__ import unicode_literals
import base64
from ..compat import (
compat_b64decode,
compat_urllib_parse_unquote,
compat_urlparse,
)
@ -61,7 +60,7 @@ class InfoQIE(BokeCCBaseIE):
encoded_id = self._search_regex(
r"jsclassref\s*=\s*'([^']*)'", webpage, 'encoded id', default=None)
real_id = compat_urllib_parse_unquote(base64.b64decode(encoded_id.encode('ascii')).decode('utf-8'))
real_id = compat_urllib_parse_unquote(compat_b64decode(encoded_id).decode('utf-8'))
playpath = 'mp4:' + real_id
return [{