From 804afc5871a88eaa32a6c161df67e6b37383d7d1 Mon Sep 17 00:00:00 2001 From: remitamine Date: Fri, 30 Oct 2015 10:20:38 +0100 Subject: [PATCH] [vgtv] improve _VALID_URL regex --- youtube_dl/extractor/vgtv.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/youtube_dl/extractor/vgtv.py b/youtube_dl/extractor/vgtv.py index 17213d9b6..e8039ec7f 100644 --- a/youtube_dl/extractor/vgtv.py +++ b/youtube_dl/extractor/vgtv.py @@ -11,17 +11,19 @@ from ..utils import ( class VGTVIE(InfoExtractor): - IE_DESC = 'VGTV, BTTV, FTV, Aftenposten, Aftonbladet' + IE_DESC = 'VGTV, BTTV, FTV, Aftenposten and Aftonbladet' _VALID_URL = r'''(?x) - (?: - vgtv:| - http://(?:www\.)? + http://(?:www\.)? + (?P + vgtv.no| + (?:bt|aftenbladet).no/tv| + fvn.no/fvntv| + aftenposten.no/webtv ) - (?Pvgtv.no|(?:bt.no|aftenbladet.no)/tv|fvn.no/fvntv|aftenposten.no/webtv) + / (?: - :| - /\#!/(?:video|live)/| - /embed?id= + \#!/(?:video|live)/| + embed?.*id= ) (?P[0-9]+) ''' @@ -211,7 +213,7 @@ class BTArticleIE(InfoExtractor): webpage = self._download_webpage(url, self._match_id(url)) video_id = self._search_regex( r'SVP\.Player\.load\(\s*(\d+)', webpage, 'video id') - return self.url_result('vgtv:bt:%s' % video_id, 'VGTV') + return self.url_result('http://bt.no/tv/embed?id=%s' % video_id, 'VGTV') class BTVestlendingenIE(InfoExtractor): -- 2.30.2