]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/nrl.py
[ie/youtube] Suppress "Unavailable videos are hidden" warning (#10159)
[yt-dlp.git] / yt_dlp / extractor / nrl.py
CommitLineData
fdc21836
RA
1from .common import InfoExtractor
2
3
4class NRLTVIE(InfoExtractor):
9751a457 5 _WORKING = False
fdc21836
RA
6 _VALID_URL = r'https?://(?:www\.)?nrl\.com/tv(/[^/]+)*/(?P<id>[^/?&#]+)'
7 _TEST = {
8 'url': 'https://www.nrl.com/tv/news/match-highlights-titans-v-knights-862805/',
9 'info_dict': {
10 'id': 'YyNnFuaDE6kPJqlDhG4CGQ_w89mKTau4',
11 'ext': 'mp4',
12 'title': 'Match Highlights: Titans v Knights',
13 },
14 'params': {
15 # m3u8 download
16 'skip_download': True,
fdc21836
RA
17 },
18 }
19
20 def _real_extract(self, url):
21 display_id = self._match_id(url)
22 webpage = self._download_webpage(url, display_id)
12cc8912
RA
23 q_data = self._parse_json(self._html_search_regex(
24 r'(?s)q-data="({.+?})"', webpage, 'player data'), display_id)
fdc21836
RA
25 ooyala_id = q_data['videoId']
26 return self.url_result(
27 'ooyala:' + ooyala_id, 'Ooyala', ooyala_id, q_data.get('title'))