diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-12-13 11:02:24 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-12-13 12:35:45 +0100 |
commit | 5e1912cfc102f457fb9cb2472fb93c973cb68732 (patch) | |
tree | 5e0dd6bdd0424cfbef75cdae180804b065352262 /youtube_dl/extractor/engadget.py | |
parent | 293f0f39ce955b9aa8284d461a0444e27491c392 (diff) |
[5min] Remove helper method and modernize
Previously, other extractor would go call a private(!) helper method. Instead, just hardcode the 5min:video_id format - it's not if that would ever change.
Diffstat (limited to 'youtube_dl/extractor/engadget.py')
-rw-r--r-- | youtube_dl/extractor/engadget.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/youtube_dl/extractor/engadget.py b/youtube_dl/extractor/engadget.py index 92ada81d2..4ea37ebd9 100644 --- a/youtube_dl/extractor/engadget.py +++ b/youtube_dl/extractor/engadget.py @@ -3,7 +3,6 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from .fivemin import FiveMinIE from ..utils import ( url_basename, ) @@ -27,11 +26,10 @@ class EngadgetIE(InfoExtractor): } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') + video_id = self._match_id(url) if video_id is not None: - return FiveMinIE._build_result(video_id) + return self.url_result('5min:%s' % video_id) else: title = url_basename(url) webpage = self._download_webpage(url, title) @@ -39,5 +37,5 @@ class EngadgetIE(InfoExtractor): return { '_type': 'playlist', 'title': title, - 'entries': [FiveMinIE._build_result(id) for id in ids] + 'entries': [self.url_result('5min:%s' % vid) for vid in ids] } |