diff options
author | Ismael Mejia <iemejia@gmail.com> | 2013-08-22 23:29:36 +0200 |
---|---|---|
committer | Ismael Mejia <iemejia@gmail.com> | 2013-08-22 23:29:36 +0200 |
commit | 18b4e04f1c663e0ea695f6501b860f85af9d7ca1 (patch) | |
tree | d60ebbf51b8c50f808c6c251fc6c02547052a9dc /youtube_dl/extractor/wat.py | |
parent | d80a064eff4fe2416f9db36b07f1e2ca641f1334 (diff) | |
parent | 1865ed31b955795f9859df5c1c400d172ae9a28a (diff) |
Merge branch 'master' into subtitles_rework
Diffstat (limited to 'youtube_dl/extractor/wat.py')
-rw-r--r-- | youtube_dl/extractor/wat.py | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/youtube_dl/extractor/wat.py b/youtube_dl/extractor/wat.py index 0d1302cd2..7d228edac 100644 --- a/youtube_dl/extractor/wat.py +++ b/youtube_dl/extractor/wat.py @@ -17,11 +17,12 @@ class WatIE(InfoExtractor): _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', + 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', - } + }, + u'skip': u'Sometimes wat serves the whole file with the --test option', } def download_video_info(self, real_id): @@ -58,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'], |