# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, unified_timestamp, ) import re class FranceInterIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?franceinter\.fr/emissions/(?P[^?#]+)' _TEST = { 'url': 'https://www.franceinter.fr/emissions/la-tete-au-carre/la-tete-au-carre-30-juin-2016', 'md5': 'f13e4371662cf5a829f64d829ae78062', 'info_dict': { 'id': 'la-tete-au-carre/la-tete-au-carre-30-juin-2016', 'ext': 'mp3', 'title': 'Regards sur le sport du 30 juin 2016 - France Inter', 'description': 'UEFA Europa, Jeux Olympiques... La période est aux sports, dans les gradins ou devant les écrans. Mais quel est le regard des spécialistes sur cette pratique? ', 'timestamp': 1467244800, 'upload_date': '20160630', }, } def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) video_url = self._search_regex( r'