mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-21 04:24:27 +00:00
changed wimp.py according to the changes suggested by jaime
This commit is contained in:
parent
8bcc355972
commit
5abeaf0650
@ -10,11 +10,11 @@ class WimpIE(InfoExtractor):
|
|||||||
mobj = re.match(self._VALID_URL, url)
|
mobj = re.match(self._VALID_URL, url)
|
||||||
video_id = mobj.group(1)
|
video_id = mobj.group(1)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
title = re.search('\<meta name\="description" content="(.+?)" \/\>',webpage).group(1)
|
title = self._search_regex('\<meta name\="description" content="(.+?)" \/\>',webpage, 'video title')
|
||||||
thumbnail_url = re.search('\<meta property\=\"og\:image" content\=\"(.+?)\" />',webpage).group(1)
|
thumbnail_url = self._search_regex('\<meta property\=\"og\:image" content\=\"(.+?)\" />',webpage,'video thumbnail')
|
||||||
googleString = re.search("googleCode = '(.*?)'", webpage)
|
googleString = self._search_regex("googleCode = '(.*?)'", webpage,'file url')
|
||||||
googleString = base64.b64decode(googleString.group(1))
|
googleString = base64.b64decode(googleString)
|
||||||
final_url = re.search('","(.*?)"', googleString).group(1)
|
final_url = self._search_regex('","(.*?)"', googleString,'final video url')
|
||||||
ext = final_url.split('.')[-1]
|
ext = final_url.split('.')[-1]
|
||||||
return [{
|
return [{
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -23,3 +23,4 @@ class WimpIE(InfoExtractor):
|
|||||||
'title': title,
|
'title': title,
|
||||||
'thumbnail': thumbnail_url,
|
'thumbnail': thumbnail_url,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user