1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-01 19:02:50 +08:00

Shorten the code

This commit is contained in:
Cezary Drożak 2020-07-31 13:26:17 +02:00
parent c88611a773
commit 12e9f45a37

View File

@ -148,12 +148,8 @@ class CDAIE(InfoExtractor):
url = compat_urllib_parse_unquote(url)
char_list = list(url)
for i, char in enumerate(char_list):
char_code = ord(char)
if 33 <= char_code <= 126:
char_list[i] = chr(33 + ((char_code + 14) % 94))
url = ''.join(char_list)
url = ''.join(map(lambda char: chr(33 + ((ord(char) + 14) % 94))
if 33 <= ord(char) <= 126 else char, url))
url = url.replace('.cda.mp4', '')
url = url.replace('.2cda.pl', '.cda.pl')