diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-29 23:38:02 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-07-29 23:38:02 +0200 |
commit | 0725f584e157e9ae467cb62af60d5f3c9bcf8e2c (patch) | |
tree | e98286cb22b06f309d102eb20a7d5b1d2a383a3c /youtube_dl/extractor/wat.py | |
parent | 8cda9241d12b1bfb83bd609924f5e215304b9e91 (diff) |
[wat] fix the extraction of the video url (fixes #1103)
Use the direct download link for Android.
Diffstat (limited to 'youtube_dl/extractor/wat.py')
-rw-r--r-- | youtube_dl/extractor/wat.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/youtube_dl/extractor/wat.py b/youtube_dl/extractor/wat.py index 0407a2d26..6ac391225 100644 --- a/youtube_dl/extractor/wat.py +++ b/youtube_dl/extractor/wat.py @@ -12,13 +12,13 @@ from ..utils import ( class WatIE(InfoExtractor): - _WORKING = False _VALID_URL=r'http://www.wat.tv/.*-(?P<shortID>.*?)_.*?.html' IE_NAME = 'wat.tv' _TEST = { u'url': u'http://www.wat.tv/video/world-war-philadelphia-vost-6bv55_2fjr7_.html', u'file': u'10631273.mp4', - u'md5': u'0a4fe7870f31eaeabb5e25fd8da8414a', + # Sometimes wat serves the whole file with the --test option + u'md5': u'd8b2231e1e333acd12aad94b80937e19', u'info_dict': { u'title': u'World War Z - Philadelphia VOST', u'description': u'La menace est partout. Que se passe-t-il à Philadelphia ?\r\nWORLD WAR Z, avec Brad Pitt, au cinéma le 3 juillet.\r\nhttp://www.worldwarz.fr', @@ -59,20 +59,8 @@ class WatIE(InfoExtractor): # Otherwise we can continue and extract just one part, we have to use # the short id for getting the video url - player_data = compat_urllib_parse.urlencode({'shortVideoId': short_id, - 'html5': '1'}) - player_info = self._download_webpage('http://www.wat.tv/player?' + player_data, - real_id, u'Downloading player info') - player = json.loads(player_info)['player'] - html5_player = self._html_search_regex(r'iframe src="(.*?)"', player, - 'html5 player') - player_webpage = self._download_webpage(html5_player, real_id, - u'Downloading player webpage') - - video_url = self._search_regex(r'urlhtml5 : "(.*?)"', player_webpage, - 'video url') info = {'id': real_id, - 'url': video_url, + 'url': 'http://wat.tv/get/android5/%s.mp4' % real_id, 'ext': 'mp4', 'title': first_chapter['title'], 'thumbnail': first_chapter['preview'], |