diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-12 19:00:19 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-12 22:12:04 +0200 |
commit | 46720279c28afb646b6ac19bcb11e85bb4bea726 (patch) | |
tree | c38b786e0176511bfbe5295a8a73582b121018fc /youtube_dl/extractor/ehow.py | |
parent | d8269e1dfbe06d4b373211e54476bcd326f69abe (diff) |
InfoExtractor: add some helper methods to extract OpenGraph info
Diffstat (limited to 'youtube_dl/extractor/ehow.py')
-rw-r--r-- | youtube_dl/extractor/ehow.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/youtube_dl/extractor/ehow.py b/youtube_dl/extractor/ehow.py index 1f0b3888e..2bb77aec6 100644 --- a/youtube_dl/extractor/ehow.py +++ b/youtube_dl/extractor/ehow.py @@ -28,14 +28,9 @@ class EHowIE(InfoExtractor): video_url = self._search_regex(r'(?:file|source)=(http[^\'"&]*)', webpage, u'video URL') final_url = compat_urllib_parse.unquote(video_url) - thumbnail_url = self._search_regex(r'<meta property="og:image" content="(.+?)" />', - webpage, u'thumbnail URL') uploader = self._search_regex(r'<meta name="uploader" content="(.+?)" />', webpage, u'uploader') - title = self._search_regex(r'<meta property="og:title" content="(.+?)" />', - webpage, u'Video title').replace(' | eHow', '') - description = self._search_regex(r'<meta property="og:description" content="(.+?)" />', - webpage, u'video description') + title = self._og_search_title(webpage).replace(' | eHow', '') ext = determine_ext(final_url) return { @@ -44,8 +39,8 @@ class EHowIE(InfoExtractor): 'url': final_url, 'ext': ext, 'title': title, - 'thumbnail': thumbnail_url, - 'description': description, + 'thumbnail': self._og_search_thumbnail(webpage), + 'description': self._og_search_description(webpage), 'uploader': uploader, } |