From: Philipp Hagemeister Date: Tue, 1 Jan 2013 18:37:07 +0000 (+0100) Subject: Move gen_extractors to InfoExtractors X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=4aeae91f86f7ec1cb68a43acd003d6c6109e91f6;p=youtube-dl Move gen_extractors to InfoExtractors --- diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 3dad82835..33669920d 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -3764,7 +3764,7 @@ class SteamIE(InfoExtractor): (?P\d*)(?P\??) #For urltype == video we sometimes get the videoID """ IE_NAME = u'Steam' - + def suitable(self, url): """Receives a URL and returns True if suitable for this IE.""" return re.match(self._VALID_URL, url, re.VERBOSE) is not None @@ -3833,4 +3833,50 @@ class UstreamIE(InfoExtractor): 'uploader': uploader } return [info] - pass + + +def gen_extractors(): + """ Return a list of an instance of every supported extractor. + The order does matter; the first extractor matched is the one handling the URL. + """ + return [ + YoutubePlaylistIE(), + YoutubeChannelIE(), + YoutubeUserIE(), + YoutubeSearchIE(), + YoutubeIE(), + MetacafeIE(), + DailymotionIE(), + GoogleSearchIE(), + PhotobucketIE(), + YahooIE(), + YahooSearchIE(), + DepositFilesIE(), + FacebookIE(), + BlipTVUserIE(), + BlipTVIE(), + VimeoIE(), + MyVideoIE(), + ComedyCentralIE(), + EscapistIE(), + CollegeHumorIE(), + XVideosIE(), + SoundcloudIE(), + InfoQIE(), + MixcloudIE(), + StanfordOpenClassroomIE(), + MTVIE(), + YoukuIE(), + XNXXIE(), + GooglePlusIE(), + ArteTvIE(), + NBAIE(), + JustinTVIE(), + FunnyOrDieIE(), + TweetReelIE(), + SteamIE(), + UstreamIE(), + GenericIE() + ] + + diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 6ab200f6a..1d914709f 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -41,7 +41,7 @@ from .utils import * from .update import update_self from .version import __version__ from .FileDownloader import * -from .InfoExtractors import * +from .InfoExtractors import gen_extractors from .PostProcessor import * def parseOpts(): @@ -275,50 +275,6 @@ def parseOpts(): return parser, opts, args -def gen_extractors(): - """ Return a list of an instance of every supported extractor. - The order does matter; the first extractor matched is the one handling the URL. - """ - return [ - YoutubePlaylistIE(), - YoutubeChannelIE(), - YoutubeUserIE(), - YoutubeSearchIE(), - YoutubeIE(), - MetacafeIE(), - DailymotionIE(), - GoogleSearchIE(), - PhotobucketIE(), - YahooIE(), - YahooSearchIE(), - DepositFilesIE(), - FacebookIE(), - BlipTVUserIE(), - BlipTVIE(), - VimeoIE(), - MyVideoIE(), - ComedyCentralIE(), - EscapistIE(), - CollegeHumorIE(), - XVideosIE(), - SoundcloudIE(), - InfoQIE(), - MixcloudIE(), - StanfordOpenClassroomIE(), - MTVIE(), - YoukuIE(), - XNXXIE(), - GooglePlusIE(), - ArteTvIE(), - NBAIE(), - JustinTVIE(), - FunnyOrDieIE(), - TweetReelIE(), - SteamIE(), - UstreamIE(), - GenericIE() - ] - def _real_main(): parser, opts, args = parseOpts()