aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-06-01 18:05:41 +0530
committerdirkf <fieldhouse@gmx.net>2023-02-20 20:27:25 +0000
commit1d3751c3fe50b203d3e2bff71d866c8c500f8288 (patch)
treef114ce1ae17ea24c44f3e3b5e5428822d4040c0d /youtube_dl/extractor
parent6067451e432fb65d487a8a67bb5cff52efb9ccf4 (diff)
downloadyoutube-dl-1d3751c3fe50b203d3e2bff71d866c8c500f8288.tar.xz
Escape URLs in `sanitized_Request`, not `sanitize_url` d2558234cf5dd12d6896eed5427b7dcdb3ab7b5a added escaping of URLs while sanitizing. However, `sanitize_url` may not always receive an actual URL. Eg: When using `youtube-dl "search query" --default-search ytsearch`, `search query` gets escaped to `search%20query` before being prefixed with `ytsearch:` which is not the intended behavior. So the escaping is moved to `sanitized_Request` instead.
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/generic.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index 0e473e952..b01900afa 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -2320,6 +2320,25 @@ class GenericIE(InfoExtractor):
'height': 720,
'age_limit': 18,
},
+ }, {
+ # would like to use the yt-dl test video but searching for
+ # '"\'/\\รคโ†ญ๐•' fails, so using an old vid from YouTube Korea
+ 'note': 'Test default search',
+ 'url': 'Shorts๋กœ ํ—ˆ๋ฝ ํ•„์š”์—†์ด ๋†€์ž! (BTSํŽธ)',
+ 'info_dict': {
+ 'id': 'usDGO4Zb-dc',
+ 'ext': 'mp4',
+ 'title': 'YouTube Shorts๋กœ ํ—ˆ๋ฝ ํ•„์š”์—†์ด ๋†€์ž! (BTSํŽธ)',
+ 'description': 'md5:96e31607eba81ab441567b5e289f4716',
+ 'upload_date': '20211107',
+ 'uploader': 'YouTube Korea',
+ 'location': '๋Œ€ํ•œ๋ฏผ๊ตญ',
+ },
+ 'params': {
+ 'default_search': 'ytsearch',
+ 'skip_download': True,
+ },
+ 'expected_warnings': ['uploader id'],
},
]