1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-14 07:57:15 +08:00

Updated Wimp.com extractor to work with newer jPlayer code using data-dash values in the video div tag

This commit is contained in:
Michael Moore 2017-01-30 10:59:39 -06:00
parent dadb836139
commit aa41c9c5cf

View File

@ -12,22 +12,28 @@ class WimpIE(JWPlatformBaseIE):
'info_dict': {
'id': 'maru-is-exhausted',
'ext': 'mp4',
'title': 'Maru is exhausted.',
'title': 'Maru Is Exhausted.',
'description': 'md5:57e099e857c0a4ea312542b684a869b8',
}
}, {
'url': 'http://www.wimp.com/clowncar/',
'md5': '5c31ad862a90dc5b1f023956faec13fe',
'md5': '4e2986c793694b55b37cf92521d12bb4',
'info_dict': {
'id': 'cG4CEr2aiSg',
'ext': 'webm',
'title': 'Basset hound clown car...incredible!',
'description': '5 of my Bassets crawled in this dog loo! www.bellinghambassets.com\n\nFor licensing/usage please contact: licensing(at)jukinmediadotcom',
'upload_date': '20140303',
'uploader': 'Gretchen Hoey',
'uploader_id': 'gretchenandjeff1',
'id': 'clowncar',
'ext': 'mp4',
'title': 'It\'s Like A Clown Car.',
'description': 'Gretchen Hoey raises Basset Hounds and on this particular day, she catches a few of them snuggling together in one doghouse. After one of them notices her, they all begin to funnel out of the doghouse like clowns in a clown car to greet her.'
},
'add_ie': ['Youtube'],
}, {
'url': 'http://www.wimp.com/bird-does-funny-march/',
'md5': 'f2833774cf4d680849989a1cf92a06cc',
'info_dict': {
'id': 'bird-does-funny-march',
'ext': 'mp4',
'title': 'Bird Does Funny March',
'description': 'This bird\'s walk might look pretty silly, but as soon as you add some military marching music over it, it becomes the most regal sight you\'ve ever seen.\r\n'
}
}]
def _real_extract(self, url):
@ -45,13 +51,23 @@ class WimpIE(JWPlatformBaseIE):
'ie_key': YoutubeIE.ie_key(),
}
info_dict = self._extract_jwplayer_data(
webpage, video_id, require_title=False)
url = self._search_regex(r'class=\'oyt-container .*? data-src=\'(.*?)\'', webpage, 'Video URL', default=None, fatal=False)
info_dict.update({
'id': video_id,
'title': self._og_search_title(webpage),
'description': self._og_search_description(webpage),
})
if url:
info_dict = {
'id': video_id,
'title': self._og_search_title(webpage),
'description': self._og_search_description(webpage),
'url': url
}
else:
info_dict = self._extract_jwplayer_data(
webpage, video_id, require_title=False)
info_dict.update({
'id': video_id,
'title': self._og_search_title(webpage),
'description': self._og_search_description(webpage),
})
return info_dict