diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-22 20:34:59 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-08-23 00:50:42 +0530 |
commit | 8fc54b1230e360fe6543bbbe8eea19ca2e8e06f3 (patch) | |
tree | 9efd85f222113a6830ef7569b92eeb08671798c8 | |
parent | da33e35b055100cc98419873f7219a778489f403 (diff) | |
download | hypervideo-pre-8fc54b1230e360fe6543bbbe8eea19ca2e8e06f3.tar.lz hypervideo-pre-8fc54b1230e360fe6543bbbe8eea19ca2e8e06f3.tar.xz hypervideo-pre-8fc54b1230e360fe6543bbbe8eea19ca2e8e06f3.zip |
[youtube] Add `shorts` to `_VALID_URL`
Normally the generic extractor will redirect the URL,
but the cookies consent screen may sometimes appear instead
Closes #752
-rw-r--r-- | yt_dlp/extractor/youtube.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index bf007273c..5bce53349 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -945,7 +945,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): youtube\.googleapis\.com)/ # the various hostnames, with wildcard subdomains (?:.*?\#/)? # handle anchor (#/) redirect urls (?: # the various things that can precede the ID: - (?:(?:v|embed|e)/(?!videoseries)) # v/ or embed/ or e/ + (?:(?:v|embed|e|shorts)/(?!videoseries)) # v/ or embed/ or e/ or shorts/ |(?: # or the v= param in all its forms (?:(?:watch|movie)(?:_popup)?(?:\.php)?/?)? # preceding watch(_popup|.php) or nothing (like /?v=xxxx) (?:\?|\#!?) # the params delimiter ? or # or #! @@ -1831,7 +1831,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'params': { 'extractor_args': {'youtube': {'player_skip': ['configs']}}, }, - } + }, { + # shorts + 'url': 'https://www.youtube.com/shorts/BGQWPY4IigY', + 'only_matching': True, + }, ] @classmethod |