mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[youtube:search] Add tests
This commit is contained in:
parent
1e5d87beee
commit
84bbc54599
1 changed files with 16 additions and 2 deletions
|
@ -5311,7 +5311,14 @@ class YoutubeSearchIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
||||||
IE_NAME = 'youtube:search'
|
IE_NAME = 'youtube:search'
|
||||||
_SEARCH_KEY = 'ytsearch'
|
_SEARCH_KEY = 'ytsearch'
|
||||||
_SEARCH_PARAMS = 'EgIQAQ%3D%3D' # Videos only
|
_SEARCH_PARAMS = 'EgIQAQ%3D%3D' # Videos only
|
||||||
_TESTS = []
|
_TESTS = [{
|
||||||
|
'url': 'ytsearch5:youtube-dl test video',
|
||||||
|
'playlist_count': 5,
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'youtube-dl test video',
|
||||||
|
'title': 'youtube-dl test video',
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
|
||||||
class YoutubeSearchDateIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
class YoutubeSearchDateIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
||||||
|
@ -5319,7 +5326,14 @@ class YoutubeSearchDateIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
||||||
_SEARCH_KEY = 'ytsearchdate'
|
_SEARCH_KEY = 'ytsearchdate'
|
||||||
IE_DESC = 'YouTube search, newest videos first'
|
IE_DESC = 'YouTube search, newest videos first'
|
||||||
_SEARCH_PARAMS = 'CAISAhAB' # Videos only, sorted by date
|
_SEARCH_PARAMS = 'CAISAhAB' # Videos only, sorted by date
|
||||||
_TESTS = []
|
_TESTS = [{
|
||||||
|
'url': 'ytsearchdate5:youtube-dl test video',
|
||||||
|
'playlist_count': 5,
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'youtube-dl test video',
|
||||||
|
'title': 'youtube-dl test video',
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
|
||||||
class YoutubeSearchURLIE(YoutubeTabBaseInfoExtractor):
|
class YoutubeSearchURLIE(YoutubeTabBaseInfoExtractor):
|
||||||
|
|
Loading…
Reference in a new issue