2 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from ..utils import int_or_none
7 class StitcherIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?stitcher\.com/podcast/[\/a-z\-]+(?P<id>\d+)'
10 'url': 'http://www.stitcher.com/podcast/the-talking-machines/e/40789481?autoplay=true',
11 'md5': '391dd4e021e6edeb7b8e68fbf2e9e940',
15 'title': 'Machine Learning Mastery and Cancer Clusters from Talking Machines',
19 def _real_extract(self, url):
20 audio_id = self._match_id(url)
22 webpage = self._download_webpage(url, audio_id)
24 title = self._og_search_title(webpage)
25 url = self._search_regex(r'episodeURL: "(.+?)"', webpage, 'url')
26 episode_image = self._search_regex(r'episodeImage: "(.+?)"', webpage, 'episode_image', fatal=False)
27 duration = int_or_none(self._search_regex(r'duration: (\d+?),', webpage, 'duration', fatal=False))
34 'thumbnail': episode_image,