-
- def _real_extract(self, url):
- video_id = self._match_id(url)
- return self._extract_from_player(url, video_id)
-
-
-class FranceCultureEmissionIE(FranceCultureIE):
- _VALID_URL = r'https?://(?:www\.)?franceculture\.fr/emission-(?P<id>[^?#]+)'
- _TEST = {
- 'url': 'http://www.franceculture.fr/emission-les-carnets-de-la-creation-jean-gabriel-periot-cineaste-2015-10-13',
- 'info_dict': {
- 'title': 'Jean-Gabriel Périot, cinéaste',
- 'alt_title': 'Les Carnets de la création',
- 'id': '5093239',
- 'display_id': 'les-carnets-de-la-creation-jean-gabriel-periot-cineaste-2015-10-13',
- 'ext': 'mp3',
- 'timestamp': 1444762500,
- 'upload_date': '20151013',
- 'description': 'startswith:Aujourd\'hui dans "Les carnets de la création", le cinéaste',
- },
- }
-
- def _real_extract(self, url):
- video_id = self._match_id(url)
- webpage = self._download_webpage(url, video_id)
- video_path = self._html_search_regex(
- r'<a class="rf-player-open".*?href="([^"]+)"', webpage, 'video path', 'no_path_player')
- if video_path == 'no_path_player':
- raise ExtractorError('no player : no sound in this page.', expected=True)
- new_id = self._search_regex('play=(?P<id>[0-9]+)', video_path, 'new_id', group='id')
- video_url = compat_urlparse.urljoin(url, video_path)
- return self._extract_from_player(video_url, new_id)