From 153697660dfbc5f510f756e22e30d1ac86d9e612 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sun, 23 Jun 2013 21:08:17 +0200 Subject: [PATCH] Move Escapist into its own file --- youtube_dl/InfoExtractors.py | 57 +------------------------- youtube_dl/extractor/escapist.py | 68 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 56 deletions(-) create mode 100644 youtube_dl/extractor/escapist.py diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 6c75d84e55..1edafb43cb 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -24,6 +24,7 @@ from .extractor.bliptv import BlipTVIE, BlipTVUserIE from .extractor.comedycentral import ComedyCentralIE from .extractor.dailymotion import DailymotionIE from .extractor.depositfiles import DepositFilesIE +from .extractor.escapist import EscapistIE from .extractor.facebook import FacebookIE from .extractor.gametrailers import GametrailersIE from .extractor.generic import GenericIE @@ -66,62 +67,6 @@ from .extractor.zdf import ZDFIE -class EscapistIE(InfoExtractor): - _VALID_URL = r'^(https?://)?(www\.)?escapistmagazine\.com/videos/view/(?P[^/]+)/(?P[^/?]+)[/?]?.*$' - - def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - if mobj is None: - raise ExtractorError(u'Invalid URL: %s' % url) - showName = mobj.group('showname') - videoId = mobj.group('episode') - - self.report_extraction(videoId) - webpage = self._download_webpage(url, videoId) - - videoDesc = self._html_search_regex('[^/]+)/(?P[^/?]+)[/?]?.*$' + + def _real_extract(self, url): + mobj = re.match(self._VALID_URL, url) + if mobj is None: + raise ExtractorError(u'Invalid URL: %s' % url) + showName = mobj.group('showname') + videoId = mobj.group('episode') + + self.report_extraction(videoId) + webpage = self._download_webpage(url, videoId) + + videoDesc = self._html_search_regex('