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,
19 'format': 'bestvideo',
23 def _real_extract(self, url):
24 display_id = self._match_id(url)
25 webpage = self._download_webpage(url, display_id)
26 q_data = self._parse_json(self._search_regex(
27 r"(?s)q-data='({.+?})'", webpage, 'player data'), display_id)
28 ooyala_id = q_data['videoId']
29 return self.url_result(
30 'ooyala:' + ooyala_id, 'Ooyala', ooyala_id, q_data.get('title'))