mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-18 15:36:38 +00:00
[youtube:searchurl] Extend _VALID_URL
This commit is contained in:
parent
8eacae8cf9
commit
d2c1f79f20
@ -1912,13 +1912,16 @@ class YoutubeSearchDateIE(YoutubeSearchIE):
|
|||||||
class YoutubeSearchURLIE(InfoExtractor):
|
class YoutubeSearchURLIE(InfoExtractor):
|
||||||
IE_DESC = 'YouTube.com search URLs'
|
IE_DESC = 'YouTube.com search URLs'
|
||||||
IE_NAME = 'youtube:search_url'
|
IE_NAME = 'youtube:search_url'
|
||||||
_VALID_URL = r'https?://(?:www\.)?youtube\.com/results\?(.*?&)?search_query=(?P<query>[^&]+)(?:[&]|$)'
|
_VALID_URL = r'https?://(?:www\.)?youtube\.com/results\?(.*?&)?(?:search_query|q)=(?P<query>[^&]+)(?:[&]|$)'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video',
|
'url': 'https://www.youtube.com/results?baz=bar&search_query=youtube-dl+test+video&filters=video&lclk=video',
|
||||||
'playlist_mincount': 5,
|
'playlist_mincount': 5,
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'title': 'youtube-dl test video',
|
'title': 'youtube-dl test video',
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
'url': 'https://www.youtube.com/results?q=test&sp=EgQIBBgB',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
Loading…
Reference in New Issue
Block a user