X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fvgtv.py;h=e6ee1e4715efc5d47dd3f9aa32d6559a5737a8ea;hb=0b9f7cd074786abafcd35b26db4ecb4d92814393;hp=ad07e54c9d6e1c0c0be06426f1c1a316a2445487;hpb=0ceab8474924c4e7a6e28497c8da40cc5002c8d3;p=youtube-dl diff --git a/youtube_dl/extractor/vgtv.py b/youtube_dl/extractor/vgtv.py index ad07e54c9..e6ee1e471 100644 --- a/youtube_dl/extractor/vgtv.py +++ b/youtube_dl/extractor/vgtv.py @@ -17,7 +17,7 @@ class VGTVIE(InfoExtractor): (?Pvgtv|bt) (?: :| - \.no/(?:tv/)?#!/(?:video|live)/ + \.no/(?:tv/)?\#!/(?:video|live)/ ) (?P[0-9]+) ''' @@ -103,11 +103,14 @@ class VGTVIE(InfoExtractor): hls_url = streams.get('hls') if hls_url: - formats.extend(self._extract_m3u8_formats(hls_url, video_id, 'mp4')) + formats.extend(self._extract_m3u8_formats( + hls_url, video_id, 'mp4', m3u8_id='hls')) hds_url = streams.get('hds') if hds_url: - formats.extend(self._extract_f4m_formats(hds_url + '?hdcore=3.2.0&plugin=aasp-3.2.0.77.18', video_id)) + formats.extend(self._extract_f4m_formats( + hds_url + '?hdcore=3.2.0&plugin=aasp-3.2.0.77.18', + video_id, f4m_id='hds')) mp4_url = streams.get('mp4') if mp4_url: @@ -143,7 +146,8 @@ class VGTVIE(InfoExtractor): class BTArticleIE(InfoExtractor): - IE_DESC = 'Bergens Tidende' + IE_NAME = 'bt:article' + IE_DESC = 'Bergens Tidende Articles' _VALID_URL = 'http://(?:www\.)?bt\.no/(?:[^/]+/)+(?P[^/]+)-\d+\.html' _TEST = { 'url': 'http://www.bt.no/nyheter/lokalt/Kjemper-for-internatet-1788214.html', @@ -166,3 +170,24 @@ class BTArticleIE(InfoExtractor): video_id = self._search_regex( r'SVP\.Player\.load\(\s*(\d+)', webpage, 'video id') return self.url_result('vgtv:bt:%s' % video_id, 'VGTV') + + +class BTVestlendingenIE(InfoExtractor): + IE_NAME = 'bt:vestlendingen' + IE_DESC = 'Bergens Tidende - Vestlendingen' + _VALID_URL = 'http://(?:www\.)?bt\.no/spesial/vestlendingen/#!/(?P\d+)' + _TEST = { + 'url': 'http://www.bt.no/spesial/vestlendingen/#!/86588', + 'md5': 'd7d17e3337dc80de6d3a540aefbe441b', + 'info_dict': { + 'id': '86588', + 'ext': 'mov', + 'title': 'Otto Wollertsen', + 'description': 'Vestlendingen Otto Fredrik Wollertsen', + 'timestamp': 1430473209, + 'upload_date': '20150501', + }, + } + + def _real_extract(self, url): + return self.url_result('xstream:btno:%s' % self._match_id(url), 'Xstream')