From 46720279c28afb646b6ac19bcb11e85bb4bea726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Fri, 12 Jul 2013 19:00:19 +0200 Subject: InfoExtractor: add some helper methods to extract OpenGraph info --- youtube_dl/extractor/ehow.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'youtube_dl/extractor/ehow.py') 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'', - webpage, u'thumbnail URL') uploader = self._search_regex(r'', webpage, u'uploader') - title = self._search_regex(r'', - webpage, u'Video title').replace(' | eHow', '') - description = self._search_regex(r'', - 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, } -- cgit v1.2.3