diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-02-02 12:03:36 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-02-02 12:03:36 +0100 |
commit | d55433bbfd9b7237bd7a52f2dc1ca7bd991a1367 (patch) | |
tree | a02672df52177c76741d4c63cb58648a69c3c3fd /youtube_dl/extractor/infoq.py | |
parent | f0ce2bc1c5880d9a92dda2dc543d21c4a8566a2f (diff) |
Remove unused imports and simplify
Diffstat (limited to 'youtube_dl/extractor/infoq.py')
-rw-r--r-- | youtube_dl/extractor/infoq.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/extractor/infoq.py b/youtube_dl/extractor/infoq.py index 7c208b85d..ed32373a1 100644 --- a/youtube_dl/extractor/infoq.py +++ b/youtube_dl/extractor/infoq.py @@ -10,7 +10,7 @@ from ..utils import ( class InfoQIE(InfoExtractor): - _VALID_URL = r'^(?:https?://)?(?:www\.)?infoq\.com/[^/]+/[^/]+$' + _VALID_URL = r'https?://(?:www\.)?infoq\.com/[^/]+/(?P<id>[^/]+)$' _TEST = { "name": "InfoQ", "url": "http://www.infoq.com/presentations/A-Few-of-My-Favorite-Python-Things", @@ -26,9 +26,9 @@ class InfoQIE(InfoExtractor): def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) + video_id = mobj.group('id') - webpage = self._download_webpage(url, video_id=url) - self.report_extraction(url) + webpage = self._download_webpage(url, video_id) # Extract video URL encoded_id = self._search_regex(r"jsclassref ?= ?'([^']*)'", webpage, 'encoded id') @@ -50,6 +50,6 @@ class InfoQIE(InfoExtractor): 'id': video_id, 'url': video_url, 'title': video_title, - 'ext': extension, # Extension is always(?) mp4, but seems to be flv + 'ext': extension, # Extension is always(?) mp4, but seems to be flv 'description': video_description, } |