diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-18 02:28:28 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-18 02:28:28 +0530 |
commit | 19a0394044bfad36cd665450271b8eb048a41c02 (patch) | |
tree | 0db2a09d23293b47f1cc3bbd3a5989120f660c37 /yt_dlp/extractor/rtve.py | |
parent | b6dc37fe2aee167bf11f863f960a4888f4886718 (diff) | |
download | hypervideo-pre-19a0394044bfad36cd665450271b8eb048a41c02.tar.lz hypervideo-pre-19a0394044bfad36cd665450271b8eb048a41c02.tar.xz hypervideo-pre-19a0394044bfad36cd665450271b8eb048a41c02.zip |
[cleanup] Misc cleanup and refactor (#2173)
Diffstat (limited to 'yt_dlp/extractor/rtve.py')
-rw-r--r-- | yt_dlp/extractor/rtve.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/yt_dlp/extractor/rtve.py b/yt_dlp/extractor/rtve.py index e5837e8c8..42a602968 100644 --- a/yt_dlp/extractor/rtve.py +++ b/yt_dlp/extractor/rtve.py @@ -1,6 +1,5 @@ import base64 import io -import sys from .common import InfoExtractor from ..compat import ( @@ -17,8 +16,6 @@ from ..utils import ( try_get, ) -_bytes_to_chr = (lambda x: x) if sys.version_info[0] == 2 else (lambda x: map(chr, x)) - class RTVEALaCartaIE(InfoExtractor): IE_NAME = 'rtve.es:alacarta' @@ -87,7 +84,7 @@ class RTVEALaCartaIE(InfoExtractor): alphabet = [] e = 0 d = 0 - for l in _bytes_to_chr(alphabet_data): + for l in alphabet_data.decode('iso-8859-1'): if d == 0: alphabet.append(l) d = e = (e + 1) % 4 @@ -97,7 +94,7 @@ class RTVEALaCartaIE(InfoExtractor): f = 0 e = 3 b = 1 - for letter in _bytes_to_chr(url_data): + for letter in url_data.decode('iso-8859-1'): if f == 0: l = int(letter) * 10 f = 1 |