mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-25 07:47:55 +01:00
Generate the list of IEs automatically
It seems like GenericIE needs to be last, but other than that, the order really does not matter anymore. To cut down on merge conflicts, generate the list of IEs automatically.
This commit is contained in:
parent
d798e1c7a9
commit
1f0483b4b1
@ -64,84 +64,18 @@ from .youporn import YouPornIE
|
|||||||
from .youtube import YoutubeIE, YoutubePlaylistIE, YoutubeSearchIE, YoutubeUserIE, YoutubeChannelIE
|
from .youtube import YoutubeIE, YoutubePlaylistIE, YoutubeSearchIE, YoutubeUserIE, YoutubeChannelIE
|
||||||
from .zdf import ZDFIE
|
from .zdf import ZDFIE
|
||||||
|
|
||||||
|
_ALL_CLASSES = [
|
||||||
|
klass
|
||||||
|
for name, klass in globals().items()
|
||||||
|
if name.endswith('IE') and name != 'GenericIE'
|
||||||
|
]
|
||||||
|
_ALL_CLASSES.append(GenericIE)
|
||||||
|
|
||||||
def gen_extractors():
|
def gen_extractors():
|
||||||
""" Return a list of an instance of every supported extractor.
|
""" Return a list of an instance of every supported extractor.
|
||||||
The order does matter; the first extractor matched is the one handling the URL.
|
The order does matter; the first extractor matched is the one handling the URL.
|
||||||
"""
|
"""
|
||||||
return [
|
return [klass() for klass in _ALL_CLASSES]
|
||||||
YoutubePlaylistIE(),
|
|
||||||
YoutubeChannelIE(),
|
|
||||||
YoutubeUserIE(),
|
|
||||||
YoutubeSearchIE(),
|
|
||||||
YoutubeIE(),
|
|
||||||
MetacafeIE(),
|
|
||||||
DailymotionIE(),
|
|
||||||
GoogleSearchIE(),
|
|
||||||
PhotobucketIE(),
|
|
||||||
YahooIE(),
|
|
||||||
YahooSearchIE(),
|
|
||||||
DepositFilesIE(),
|
|
||||||
FacebookIE(),
|
|
||||||
BlipTVIE(),
|
|
||||||
BlipTVUserIE(),
|
|
||||||
VimeoIE(),
|
|
||||||
MyVideoIE(),
|
|
||||||
ComedyCentralIE(),
|
|
||||||
EscapistIE(),
|
|
||||||
CollegeHumorIE(),
|
|
||||||
XVideosIE(),
|
|
||||||
SoundcloudSetIE(),
|
|
||||||
SoundcloudIE(),
|
|
||||||
InfoQIE(),
|
|
||||||
MixcloudIE(),
|
|
||||||
StanfordOpenClassroomIE(),
|
|
||||||
MTVIE(),
|
|
||||||
YoukuIE(),
|
|
||||||
XNXXIE(),
|
|
||||||
YouJizzIE(),
|
|
||||||
PornotubeIE(),
|
|
||||||
YouPornIE(),
|
|
||||||
GooglePlusIE(),
|
|
||||||
ArteTvIE(),
|
|
||||||
NBAIE(),
|
|
||||||
WorldStarHipHopIE(),
|
|
||||||
JustinTVIE(),
|
|
||||||
FunnyOrDieIE(),
|
|
||||||
SteamIE(),
|
|
||||||
UstreamIE(),
|
|
||||||
RBMARadioIE(),
|
|
||||||
EightTracksIE(),
|
|
||||||
KeekIE(),
|
|
||||||
TEDIE(),
|
|
||||||
MySpassIE(),
|
|
||||||
SpiegelIE(),
|
|
||||||
LiveLeakIE(),
|
|
||||||
ARDIE(),
|
|
||||||
ZDFIE(),
|
|
||||||
TumblrIE(),
|
|
||||||
BandcampIE(),
|
|
||||||
RedTubeIE(),
|
|
||||||
InaIE(),
|
|
||||||
HowcastIE(),
|
|
||||||
VineIE(),
|
|
||||||
FlickrIE(),
|
|
||||||
TeamcocoIE(),
|
|
||||||
XHamsterIE(),
|
|
||||||
HypemIE(),
|
|
||||||
Vbox7IE(),
|
|
||||||
GametrailersIE(),
|
|
||||||
StatigramIE(),
|
|
||||||
BreakIE(),
|
|
||||||
VevoIE(),
|
|
||||||
JukeboxIE(),
|
|
||||||
TudouIE(),
|
|
||||||
CSpanIE(),
|
|
||||||
WimpIE(),
|
|
||||||
HotNewHipHopIE(),
|
|
||||||
AUEngineIE(),
|
|
||||||
GenericIE()
|
|
||||||
]
|
|
||||||
|
|
||||||
def get_info_extractor(ie_name):
|
def get_info_extractor(ie_name):
|
||||||
"""Returns the info extractor class with the given ie_name"""
|
"""Returns the info extractor class with the given ie_name"""
|
||||||
|
Loading…
Reference in New Issue
Block a user