]>
jfr.im git - yt-dlp.git/blob - yt_dlp/extractor/nrl.py
2 from __future__
import unicode_literals
4 from .common
import InfoExtractor
7 class NRLTVIE(InfoExtractor
):
8 _VALID_URL
= r
'https?://(?:www\.)?nrl\.com/tv(/[^/]+)*/(?P<id>[^/?&#]+)'
10 'url': 'https://www.nrl.com/tv/news/match-highlights-titans-v-knights-862805/',
12 'id': 'YyNnFuaDE6kPJqlDhG4CGQ_w89mKTau4',
14 'title': 'Match Highlights: Titans v Knights',
18 'skip_download': True,
22 def _real_extract(self
, url
):
23 display_id
= self
._match
_id
(url
)
24 webpage
= self
._download
_webpage
(url
, display_id
)
25 q_data
= self
._parse
_json
(self
._html
_search
_regex
(
26 r
'(?s)q-data="({.+?})"', webpage
, 'player data'), display_id
)
27 ooyala_id
= q_data
['videoId']
28 return self
.url_result(
29 'ooyala:' + ooyala_id
, 'Ooyala', ooyala_id
, q_data
.get('title'))