diff options
author | M.Yasoob Khalid <yasoob.khld@gmail.com> | 2013-06-26 17:26:59 +0500 |
---|---|---|
committer | M.Yasoob Khalid <yasoob.khld@gmail.com> | 2013-06-26 17:26:59 +0500 |
commit | 5abeaf06506b35e4c0db315e847ce32843742fe2 (patch) | |
tree | fa36cd0d7a5e82567d00c53cc220e3bc12975036 /youtube_dl | |
parent | 8bcc355972020086672b0a3d8dcc2f38694f4672 (diff) |
changed wimp.py according to the changes suggested by jaime
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/wimp.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/wimp.py b/youtube_dl/extractor/wimp.py index 9d52c947e..811b37cc1 100644 --- a/youtube_dl/extractor/wimp.py +++ b/youtube_dl/extractor/wimp.py @@ -10,11 +10,11 @@ class WimpIE(InfoExtractor): mobj = re.match(self._VALID_URL, url) video_id = mobj.group(1) webpage = self._download_webpage(url, video_id) - title = re.search('\<meta name\="description" content="(.+?)" \/\>',webpage).group(1) - thumbnail_url = re.search('\<meta property\=\"og\:image" content\=\"(.+?)\" />',webpage).group(1) - googleString = re.search("googleCode = '(.*?)'", webpage) - googleString = base64.b64decode(googleString.group(1)) - final_url = re.search('","(.*?)"', googleString).group(1) + title = self._search_regex('\<meta name\="description" content="(.+?)" \/\>',webpage, 'video title') + thumbnail_url = self._search_regex('\<meta property\=\"og\:image" content\=\"(.+?)\" />',webpage,'video thumbnail') + googleString = self._search_regex("googleCode = '(.*?)'", webpage,'file url') + googleString = base64.b64decode(googleString) + final_url = self._search_regex('","(.*?)"', googleString,'final video url') ext = final_url.split('.')[-1] return [{ 'id': video_id, @@ -23,3 +23,4 @@ class WimpIE(InfoExtractor): 'title': title, 'thumbnail': thumbnail_url, }] + |