mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-15 13:47:48 +01:00
[vgtv] improve _VALID_URL regex
This commit is contained in:
parent
00d24327ef
commit
804afc5871
@ -11,17 +11,19 @@ from ..utils import (
|
|||||||
|
|
||||||
|
|
||||||
class VGTVIE(InfoExtractor):
|
class VGTVIE(InfoExtractor):
|
||||||
IE_DESC = 'VGTV, BTTV, FTV, Aftenposten, Aftonbladet'
|
IE_DESC = 'VGTV, BTTV, FTV, Aftenposten and Aftonbladet'
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
(?:
|
http://(?:www\.)?
|
||||||
vgtv:|
|
(?P<host>
|
||||||
http://(?:www\.)?
|
vgtv.no|
|
||||||
|
(?:bt|aftenbladet).no/tv|
|
||||||
|
fvn.no/fvntv|
|
||||||
|
aftenposten.no/webtv
|
||||||
)
|
)
|
||||||
(?P<host>vgtv.no|(?:bt.no|aftenbladet.no)/tv|fvn.no/fvntv|aftenposten.no/webtv)
|
/
|
||||||
(?:
|
(?:
|
||||||
:|
|
\#!/(?:video|live)/|
|
||||||
/\#!/(?:video|live)/|
|
embed?.*id=
|
||||||
/embed?id=
|
|
||||||
)
|
)
|
||||||
(?P<id>[0-9]+)
|
(?P<id>[0-9]+)
|
||||||
'''
|
'''
|
||||||
@ -211,7 +213,7 @@ class BTArticleIE(InfoExtractor):
|
|||||||
webpage = self._download_webpage(url, self._match_id(url))
|
webpage = self._download_webpage(url, self._match_id(url))
|
||||||
video_id = self._search_regex(
|
video_id = self._search_regex(
|
||||||
r'SVP\.Player\.load\(\s*(\d+)', webpage, 'video id')
|
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):
|
class BTVestlendingenIE(InfoExtractor):
|
||||||
|
Loading…
Reference in New Issue
Block a user