diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-07-17 01:35:33 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-07-17 01:35:33 +0200 |
commit | ec00e1d8a01dafe8efafe554668c930bf4683f82 (patch) | |
tree | 891147c8eff53ff457bf1829599220bb634577fa /youtube_dl | |
parent | de29c4144edf35c432e6356f2f9df561061eda50 (diff) |
[metacafe] Use modern helper methods
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/metacafe.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/youtube_dl/extractor/metacafe.py b/youtube_dl/extractor/metacafe.py index 844a24efb..94d9ef62f 100644 --- a/youtube_dl/extractor/metacafe.py +++ b/youtube_dl/extractor/metacafe.py @@ -118,11 +118,7 @@ class MetacafeIE(InfoExtractor): video_url = '%s?__gda__=%s' % (mediaURL, mobj.group('key')) video_ext = determine_ext(video_url) - mobj = re.search(r'(?im)<title>(.*) - Video</title>', webpage) - if mobj is None: - raise ExtractorError(u'Unable to extract title') - video_title = mobj.group(1).decode('utf-8') - + video_title = self._html_search_regex(r'(?im)<title>(.*) - Video</title>', webpage, u'title') video_uploader = self._html_search_regex(r'submitter=(.*?);|<p class="By">\s*By\s*<a[^>]*>(.*?)</a>', webpage, u'uploader nickname', fatal=False) return [{ |