2 from __future__ import unicode_literals
4 from .common import InfoExtractor
7 class CJSWIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?cjsw\.com/program/\S+/(?P<id>[0-9]+)'
11 'url': 'http://cjsw.com/program/freshly-squeezed/episode/20170620',
12 'md5': 'cee14d40f1e9433632c56e3d14977120',
16 'title': 'Freshly Squeezed',
17 'description': 'Sled Island artists featured // Live session with Phi Pho, followed by a live session with Sinzere & The Late Nights! // Stay Fresh Y\'all!!',
21 def _real_extract(self, url):
22 episode_id = self._match_id(url)
24 webpage = self._download_webpage(url, episode_id)
26 title = self._search_regex(
27 r'<button[^>]+data-showname=(["\'])(?P<title>(?!\1).+?)\1[^>]*>', webpage, 'title', group='title')
28 description = self._html_search_regex(
29 r'<p>(?P<description>.+?)</p>', webpage, 'description', fatal=False)
31 'url': self._search_regex(
32 r'<button[^>]+data-audio-src=(["\'])(?P<audio_url>(?!\1).+?)\1[^>]*>', webpage, 'audio_url', group='audio_url'),
39 'description': description,