2 from __future__ import unicode_literals
4 from .common import InfoExtractor
11 class FranceInterIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:www\.)?franceinter\.fr/emissions/(?P<id>[^?#]+)'
15 'url': 'https://www.franceinter.fr/emissions/la-marche-de-l-histoire/la-marche-de-l-histoire-18-decembre-2013',
16 'md5': '4764932e466e6f6c79c317d2e74f6884',
18 'id': 'la-marche-de-l-histoire/la-marche-de-l-histoire-18-decembre-2013',
20 'title': 'L’Histoire dans les jeux vidéo du 18 décembre 2013 - France Inter',
21 'description': 'L’Histoire dans les jeux vidéo du 18 décembre 2013 par Jean Lebrun en replay sur France Inter. Retrouvez l\'émission en réécoute gratuite et abonnez-vous au podcast !',
22 'timestamp': 1387324800,
23 'upload_date': '20131218',
27 def _real_extract(self, url):
28 video_id = self._match_id(url)
30 webpage = self._download_webpage(url, video_id)
32 video_url = self._search_regex(
33 r'<button class="replay-button playable" data-is-aod="1" data-url="([^"]+)"', webpage, 'video url')
35 title = self._og_search_title(webpage)
36 description = self._og_search_description(webpage)
38 extractdate = self._search_regex('(\d{2}-([a-zA-Z\s]+)-\d{4}$)', url, 'extractdate', fatal=False)
39 extractdate = extractdate.split('-')
40 extractdate = extractdate[2] + "," + str(month_by_name(extractdate[1], 'fr')) + "," + extractdate[0]
42 timestamp = unified_timestamp(extractdate)
47 'description': description,
48 'timestamp': timestamp,