X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Finfoq.py;h=18249cf9b4a29fabdcc7cf4b41061671e7ea33e8;hb=HEAD;hp=c3e892feb1fd905b98f99b5670ee7c120b0b208d;hpb=e650659b94c526362be0cf963b0f2241934bcbbe;p=youtube-dl diff --git a/youtube_dl/extractor/infoq.py b/youtube_dl/extractor/infoq.py index c3e892feb..18249cf9b 100644 --- a/youtube_dl/extractor/infoq.py +++ b/youtube_dl/extractor/infoq.py @@ -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 [{ @@ -123,9 +122,9 @@ class InfoQIE(BokeCCBaseIE): formats = self._extract_bokecc_formats(webpage, video_id) else: formats = ( - self._extract_rtmp_video(webpage) + - self._extract_http_video(webpage) + - self._extract_http_audio(webpage, video_id)) + self._extract_rtmp_video(webpage) + + self._extract_http_video(webpage) + + self._extract_http_audio(webpage, video_id)) self._sort_formats(formats)