2 from __future__ import unicode_literals
4 from .common import InfoExtractor
10 class RBMARadioIE(InfoExtractor):
11 _VALID_URL = r'https?://(?:www\.)?rbmaradio\.com/shows/[^/]+/episodes/(?P<id>[^/]+)$'
13 'url': 'https://www.rbmaradio.com/shows/main-stage/episodes/ford-lopatin-live-at-primavera-sound-2011',
14 'md5': '6bc6f9bcb18994b4c983bc3bf4384d95',
16 'id': 'ford-lopatin-live-at-primavera-sound-2011',
18 'description': 'Joel Ford and Daniel ’Oneohtrix Point Never’ Lopatin fly their midified pop extravaganza to Spain. Live at Primavera Sound 2011.',
19 'title': 'Ford & Lopatin - Main Stage',
23 def _real_extract(self, url):
24 video_id = self._match_id(url)
26 webpage = self._download_webpage(url, video_id)
27 json_data = self._search_regex(r'<script>window\.__INITIAL_STATE__\s*=\s*(.+?)</script>',
29 data = self._parse_json(json_data, video_id)
32 for episode in data['episodes']:
33 items = data['episodes'][episode]
35 item = items[video_id]
37 video_url = item['audioURL'] + '?cbr=256'
42 'title': item.get('title') + ' - ' + item.get('showTitle'),
43 'description': clean_html(item.get('longTeaser')),
44 'thumbnail': self._proto_relative_url(item.get('imageURL', {}).get('landscape')),
45 'duration': item.get('duration'),