1 from __future__ import unicode_literals
3 from .common import InfoExtractor
6 class DefenseGouvFrIE(InfoExtractor):
7 IE_NAME = 'defense.gouv.fr'
8 _VALID_URL = r'https?://.*?\.defense\.gouv\.fr/layout/set/ligthboxvideo/base-de-medias/webtv/(?P<id>[^/?#]*)'
11 'url': 'http://www.defense.gouv.fr/layout/set/ligthboxvideo/base-de-medias/webtv/attaque-chimique-syrienne-du-21-aout-2013-1',
12 'md5': '75bba6124da7e63d2d60b5244ec9430c',
16 'title': 'attaque-chimique-syrienne-du-21-aout-2013-1'
20 def _real_extract(self, url):
21 title = self._match_id(url)
22 webpage = self._download_webpage(url, title)
24 video_id = self._search_regex(
25 r"flashvars.pvg_id=\"(\d+)\";",
29 'http://static.videos.gouv.fr/brightcovehub/export/json/%s' %
31 info = self._download_json(json_url, title, 'Downloading JSON config')
32 video_url = info['renditions'][0]['url']