]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/bravotv.py
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',
18 'timestamp': 1448926740,
19 'upload_date': '20151130',
20 'uploader': 'NBCU-BRAV',
24 def _real_extract(self
, url
):
25 video_id
= self
._match
_id
(url
)
26 webpage
= self
._download
_webpage
(url
, video_id
)
27 account_pid
= self
._search
_regex
(r
'"account_pid"\s*:\s*"([^"]+)"', webpage
, 'account pid')
28 release_pid
= self
._search
_regex
(r
'"release_pid"\s*:\s*"([^"]+)"', webpage
, 'release pid')
29 return self
.url_result(smuggle_url(
30 'http://link.theplatform.com/s/%s/%s?mbr=true&switch=progressive' % (account_pid
, release_pid
),
31 {'force_smil_url': True}), 'ThePlatform', release_pid
)