2 from __future__ import unicode_literals
4 from .common import InfoExtractor
5 from ..utils import smuggle_url
8 class BravoTVIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?bravotv\.com/(?:[^/]+/)+videos/(?P<id>[^/?]+)'
11 'url': 'http://www.bravotv.com/last-chance-kitchen/season-5/videos/lck-ep-12-fishy-finale',
12 'md5': 'd60cdf68904e854fac669bd26cccf801',
16 'title': 'Last Chance Kitchen Returns',
17 'description': 'S13: Last Chance Kitchen Returns for Top Chef Season 13',
21 def _real_extract(self, url):
22 video_id = self._match_id(url)
23 webpage = self._download_webpage(url, video_id)
24 account_pid = self._search_regex(r'"account_pid"\s*:\s*"([^"]+)"', webpage, 'account pid')
25 release_pid = self._search_regex(r'"release_pid"\s*:\s*"([^"]+)"', webpage, 'release pid')
26 return self.url_result(smuggle_url(
27 'http://link.theplatform.com/s/%s/%s?mbr=true&switch=progressive' % (account_pid, release_pid),
28 {'force_smil_url': True}), 'ThePlatform', release_pid)