InfoExtractor: add some helper methods to extract OpenGraph info

This commit is contained in:
Jaime Marquínez Ferrándiz 2013-07-12 19:00:19 +02:00
parent d8269e1dfb
commit 46720279c2
17 changed files with 54 additions and 96 deletions

View file

@ -22,8 +22,6 @@ class TutvIE(InfoExtractor):
video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(
r'<meta property="og:title" content="(.*?)">', webpage, u'title')
internal_id = self._search_regex(r'codVideo=([0-9]+)', webpage, u'internal video ID')
data_url = u'http://tu.tv/flvurl.php?codVideo=' + str(internal_id)
@ -36,6 +34,6 @@ class TutvIE(InfoExtractor):
'id': internal_id,
'url': video_url,
'ext': ext,
'title': title,
'title': self._og_search_title(webpage),
}
return [info]