mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
Simplify IE index
This commit is contained in:
parent
1d2e86aed9
commit
8c5dc3ad40
1 changed files with 22 additions and 36 deletions
58
youtube-dl
58
youtube-dl
|
@ -3591,24 +3591,29 @@ def main():
|
||||||
|
|
||||||
# Information extractors
|
# Information extractors
|
||||||
youtube_ie = YoutubeIE()
|
youtube_ie = YoutubeIE()
|
||||||
metacafe_ie = MetacafeIE(youtube_ie)
|
|
||||||
dailymotion_ie = DailymotionIE()
|
|
||||||
youtube_pl_ie = YoutubePlaylistIE(youtube_ie)
|
|
||||||
youtube_user_ie = YoutubeUserIE(youtube_ie)
|
|
||||||
youtube_search_ie = YoutubeSearchIE(youtube_ie)
|
|
||||||
google_ie = GoogleIE()
|
google_ie = GoogleIE()
|
||||||
google_search_ie = GoogleSearchIE(google_ie)
|
|
||||||
photobucket_ie = PhotobucketIE()
|
|
||||||
yahoo_ie = YahooIE()
|
yahoo_ie = YahooIE()
|
||||||
yahoo_search_ie = YahooSearchIE(yahoo_ie)
|
extractors = [ # Order does matter
|
||||||
deposit_files_ie = DepositFilesIE()
|
youtube_ie,
|
||||||
facebook_ie = FacebookIE()
|
MetacafeIE(youtube_ie),
|
||||||
bliptv_ie = BlipTVIE()
|
DailymotionIE(),
|
||||||
vimeo_ie = VimeoIE()
|
YoutubePlaylistIE(youtube_ie),
|
||||||
myvideo_ie = MyVideoIE()
|
YoutubeUserIE(youtube_ie),
|
||||||
comedycentral_ie = ComedyCentralIE()
|
YoutubeSearchIE(youtube_ie),
|
||||||
|
google_ie,
|
||||||
|
GoogleSearchIE(google_ie),
|
||||||
|
PhotobucketIE(),
|
||||||
|
yahoo_ie,
|
||||||
|
YahooSearchIE(yahoo_ie),
|
||||||
|
DepositFilesIE(),
|
||||||
|
FacebookIE(),
|
||||||
|
BlipTVIE(),
|
||||||
|
VimeoIE(),
|
||||||
|
MyVideoIE(),
|
||||||
|
ComedyCentralIE(),
|
||||||
|
|
||||||
generic_ie = GenericIE()
|
GenericIE()
|
||||||
|
]
|
||||||
|
|
||||||
# File downloader
|
# File downloader
|
||||||
fd = FileDownloader({
|
fd = FileDownloader({
|
||||||
|
@ -3649,27 +3654,8 @@ def main():
|
||||||
'writedescription': opts.writedescription,
|
'writedescription': opts.writedescription,
|
||||||
'writeinfojson': opts.writeinfojson,
|
'writeinfojson': opts.writeinfojson,
|
||||||
})
|
})
|
||||||
fd.add_info_extractor(youtube_search_ie)
|
for extractor in extractors:
|
||||||
fd.add_info_extractor(youtube_pl_ie)
|
fd.add_info_extractor(extractor)
|
||||||
fd.add_info_extractor(youtube_user_ie)
|
|
||||||
fd.add_info_extractor(metacafe_ie)
|
|
||||||
fd.add_info_extractor(dailymotion_ie)
|
|
||||||
fd.add_info_extractor(youtube_ie)
|
|
||||||
fd.add_info_extractor(google_ie)
|
|
||||||
fd.add_info_extractor(google_search_ie)
|
|
||||||
fd.add_info_extractor(photobucket_ie)
|
|
||||||
fd.add_info_extractor(yahoo_ie)
|
|
||||||
fd.add_info_extractor(yahoo_search_ie)
|
|
||||||
fd.add_info_extractor(deposit_files_ie)
|
|
||||||
fd.add_info_extractor(facebook_ie)
|
|
||||||
fd.add_info_extractor(bliptv_ie)
|
|
||||||
fd.add_info_extractor(vimeo_ie)
|
|
||||||
fd.add_info_extractor(myvideo_ie)
|
|
||||||
fd.add_info_extractor(comedycentral_ie)
|
|
||||||
|
|
||||||
# This must come last since it's the
|
|
||||||
# fallback if none of the others work
|
|
||||||
fd.add_info_extractor(generic_ie)
|
|
||||||
|
|
||||||
# PostProcessors
|
# PostProcessors
|
||||||
if opts.extractaudio:
|
if opts.extractaudio:
|
||||||
|
|
Loading…
Reference in a new issue