mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-29 01:51:06 +00:00
[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
This commit is contained in:
parent
da33e35b05
commit
8fc54b1230
1 changed files with 6 additions and 2 deletions
|
@ -945,7 +945,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
youtube\.googleapis\.com)/ # the various hostnames, with wildcard subdomains
|
youtube\.googleapis\.com)/ # the various hostnames, with wildcard subdomains
|
||||||
(?:.*?\#/)? # handle anchor (#/) redirect urls
|
(?:.*?\#/)? # handle anchor (#/) redirect urls
|
||||||
(?: # the various things that can precede the ID:
|
(?: # 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
|
|(?: # or the v= param in all its forms
|
||||||
(?:(?:watch|movie)(?:_popup)?(?:\.php)?/?)? # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
|
(?:(?:watch|movie)(?:_popup)?(?:\.php)?/?)? # preceding watch(_popup|.php) or nothing (like /?v=xxxx)
|
||||||
(?:\?|\#!?) # the params delimiter ? or # or #!
|
(?:\?|\#!?) # the params delimiter ? or # or #!
|
||||||
|
@ -1831,7 +1831,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'params': {
|
'params': {
|
||||||
'extractor_args': {'youtube': {'player_skip': ['configs']}},
|
'extractor_args': {'youtube': {'player_skip': ['configs']}},
|
||||||
},
|
},
|
||||||
}
|
}, {
|
||||||
|
# shorts
|
||||||
|
'url': 'https://www.youtube.com/shorts/BGQWPY4IigY',
|
||||||
|
'only_matching': True,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue