diff options
| -rw-r--r-- | youtube_dl/extractor/tf1.py | 8 | ||||
| -rw-r--r-- | youtube_dl/extractor/wat.py | 18 | 
2 files changed, 5 insertions, 21 deletions
| diff --git a/youtube_dl/extractor/tf1.py b/youtube_dl/extractor/tf1.py index a8af89f83..7d1071cbf 100644 --- a/youtube_dl/extractor/tf1.py +++ b/youtube_dl/extractor/tf1.py @@ -6,16 +6,12 @@ import re  from .common import InfoExtractor  class TF1IE(InfoExtractor): -    """ -    TF1 uses the wat.tv player, currently it can only download videos with the -    html5 player enabled, it cannot download HD videos. -    """ -    _WORKING = False +    """TF1 uses the wat.tv player."""      _VALID_URL = r'http://videos.tf1.fr/.*-(.*?).html'      _TEST = {          u'url': u'http://videos.tf1.fr/auto-moto/citroen-grand-c4-picasso-2013-presentation-officielle-8062060.html',          u'file': u'10635995.mp4', -        u'md5': u'66789d3e91278d332f75e1feb7aea327', +        u'md5': u'2e378cc28b9957607d5e88f274e637d8',          u'info_dict': {              u'title': u'Citroën Grand C4 Picasso 2013 : présentation officielle',              u'description': u'Vidéo officielle du nouveau Citroën Grand C4 Picasso, lancé à l\'automne 2013.', 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'], | 
