class TV2IE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?tv2\.no/v/(?P<id>\d+)'
+ _VALID_URL = r'https?://(?:www\.)?tv2\.no/v\d*/(?P<id>\d+)'
_TESTS = [{
'url': 'http://www.tv2.no/v/916509/',
'info_dict': {
'view_count': int,
'categories': list,
},
+ }, {
+ 'url': 'http://www.tv2.no/v2/916509',
+ 'only_matching': True,
}]
_PROTOCOLS = ('HLS', 'DASH')
_GEO_COUNTRIES = ['NO']
return {
'id': video_id,
'url': video_url,
- 'title': self._live_title(title) if is_live else title,
+ 'title': title,
'description': strip_or_none(asset.get('description')),
'thumbnails': thumbnails,
'timestamp': parse_iso8601(asset.get('live_broadcast_time') or asset.get('update_time')),
return {
'id': video_id,
'url': video_url,
- 'title': self._live_title(title) if is_live else title,
+ 'title': title,
'description': strip_or_none(asset.get('description')),
'thumbnails': thumbnails,
'timestamp': parse_iso8601(asset.get('createTime')),