]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/tastytrade.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
4 from .ooyala
import OoyalaIE
7 class TastyTradeIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?tastytrade\.com/tt/shows/[^/]+/episodes/(?P<id>[^/?#&]+)'
11 'url': 'https://www.tastytrade.com/tt/shows/market-measures/episodes/correlation-in-short-volatility-06-28-2017',
13 'id': 'F3bnlzbToeI6pLEfRyrlfooIILUjz4nM',
15 'title': 'A History of Teaming',
16 'description': 'md5:2a9033db8da81f2edffa4c99888140b3',
20 'skip_download': True,
24 'url': 'https://www.tastytrade.com/tt/shows/daily-dose/episodes/daily-dose-06-30-2017',
25 'only_matching': True,
28 def _real_extract(self
, url
):
29 display_id
= self
._match
_id
(url
)
30 webpage
= self
._download
_webpage
(url
, display_id
)
32 ooyala_code
= self
._search
_regex
(
33 r
'data-media-id=(["\'])(?P
<code
>(?
:(?
!\
1).)+)\
1',
34 webpage, 'ooyala code
', group='code
')
36 info = self._search_json_ld(webpage, display_id, fatal=False)
38 '_type
': 'url_transparent
',
39 'ie_key
': OoyalaIE.ie_key(),
40 'url
': 'ooyala
:%s' % ooyala_code,
41 'display_id
': display_id,