mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-25 12:45:51 +01:00
[nrk] Improve _VALID_URL
This commit is contained in:
parent
e2628fb6a0
commit
853a71b628
@ -113,7 +113,17 @@ def video_id_and_title(idx):
|
|||||||
|
|
||||||
|
|
||||||
class NRKIE(NRKBaseIE):
|
class NRKIE(NRKBaseIE):
|
||||||
_VALID_URL = r'(?:nrk:|https?://(?:www\.)?nrk\.no/video/PS\*)(?P<id>[^/?#&]+)'
|
_VALID_URL = r'''(?x)
|
||||||
|
(?:
|
||||||
|
nrk:|
|
||||||
|
https?://
|
||||||
|
(?:
|
||||||
|
(?:www\.)?nrk\.no/video/PS\*|
|
||||||
|
v8-psapi\.nrk\.no/mediaelement/
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(?P<id>[^/?#&]+)
|
||||||
|
'''
|
||||||
_API_HOST = 'v8.psapi.nrk.no'
|
_API_HOST = 'v8.psapi.nrk.no'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
# video
|
# video
|
||||||
@ -140,6 +150,9 @@ class NRKIE(NRKBaseIE):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'nrk:ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
|
'url': 'nrk:ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://v8-psapi.nrk.no/mediaelement/ecc1b952-96dc-4a98-81b9-5296dc7a98d9',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user