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/traileraddict.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'youtube_dl/extractor/traileraddict.py') diff --git a/youtube_dl/extractor/traileraddict.py b/youtube_dl/extractor/traileraddict.py index 9dd26c163..324bb6231 100644 --- a/youtube_dl/extractor/traileraddict.py +++ b/youtube_dl/extractor/traileraddict.py @@ -24,11 +24,8 @@ class TrailerAddictIE(InfoExtractor): webpage, 'video title').replace(' - Trailer Addict','') view_count = self._search_regex(r'Views: (.+?)
', webpage, 'Views Count') - description = self._search_regex(r'', - webpage, 'video description') - video_id = self._search_regex(r'', - webpage, 'Video id').split('=')[1] - + video_id = self._og_search_property('video', webpage, 'Video id').split('=')[1] + info_url = "http://www.traileraddict.com/fvar.php?tid=%s" %(str(video_id)) info_webpage = self._download_webpage(info_url, video_id , "Downloading the info webpage") @@ -44,6 +41,6 @@ class TrailerAddictIE(InfoExtractor): 'ext' : ext, 'title' : title, 'thumbnail' : thumbnail_url, - 'description' : description, + 'description' : self._og_search_description(webpage), 'view_count' : view_count, }] -- cgit v1.2.3