aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/extractor/rtl2.py
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2018-01-23 22:23:12 +0700
committerSergey M․ <[email protected]>2018-01-23 22:23:12 +0700
commitcf2820710d61742818a906af07f6d6c9669d58a9 (patch)
tree49da7e89124bcbfd9d297906d8436ff1cd107820 /youtube_dl/extractor/rtl2.py
parent5d7d805ca90992cac1cdffbe5d3df3d894d2b979 (diff)
downloadyoutube-dl-cf2820710d61742818a906af07f6d6c9669d58a9.tar.gz
youtube-dl-cf2820710d61742818a906af07f6d6c9669d58a9.zip
Switch codebase to use compat_b64decode
Diffstat (limited to 'youtube_dl/extractor/rtl2.py')
-rw-r--r--youtube_dl/extractor/rtl2.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/rtl2.py b/youtube_dl/extractor/rtl2.py
index 666e90e90..18a327d81 100644
--- a/youtube_dl/extractor/rtl2.py
+++ b/youtube_dl/extractor/rtl2.py
@@ -1,12 +1,12 @@
# coding: utf-8
from __future__ import unicode_literals
-import base64
import re
from .common import InfoExtractor
from ..aes import aes_cbc_decrypt
from ..compat import (
+ compat_b64decode,
compat_ord,
compat_str,
)
@@ -142,11 +142,11 @@ class RTL2YouIE(RTL2YouBaseIE):
stream_data = self._download_json(
self._BACKWERK_BASE_URL + 'stream/video/' + video_id, video_id)
- data, iv = base64.b64decode(stream_data['streamUrl']).decode().split(':')
+ data, iv = compat_b64decode(stream_data['streamUrl']).decode().split(':')
stream_url = intlist_to_bytes(aes_cbc_decrypt(
- bytes_to_intlist(base64.b64decode(data)),
+ bytes_to_intlist(compat_b64decode(data)),
bytes_to_intlist(self._AES_KEY),
- bytes_to_intlist(base64.b64decode(iv))
+ bytes_to_intlist(compat_b64decode(iv))
))
if b'rtl2_you_video_not_found' in stream_url:
raise ExtractorError('video not found', expected=True)