mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
[ie/nrk] allow selection of CDN via extractor args
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
This commit is contained in:
parent
79ec2fdff7
commit
a4f130cdfa
2 changed files with 6 additions and 1 deletions
|
@ -1866,6 +1866,9 @@ #### bilibili
|
|||
#### sonylivseries
|
||||
* `sort_order`: Episode sort order for series extraction - one of `asc` (ascending, oldest first) or `desc` (descending, newest first). Default is `asc`
|
||||
|
||||
#### nrk
|
||||
* `cdn`: CDN ID to use with the API call for stream URLs - one of `akamai`, `globalconnect`, `telenor`. Default is `akamai`
|
||||
|
||||
**Note**: These options may be changed/removed in the future without concern for backward compatibility
|
||||
|
||||
<!-- MANPAGE: MOVE "INSTALLATION" SECTION HERE -->
|
||||
|
|
|
@ -171,7 +171,9 @@ def call_playback_api(item, query=None):
|
|||
raise
|
||||
|
||||
# known values for preferredCdn: akamai, globalconnect and telenor
|
||||
manifest = call_playback_api('manifest', {'preferredCdn': 'akamai'})
|
||||
# use of unsupported values will return URLs from random CDNs
|
||||
cdn_id = self._configuration_arg('cdn', ['akamai'])
|
||||
manifest = call_playback_api('manifest', {'preferredCdn': cdn_id})
|
||||
|
||||
video_id = try_get(manifest, lambda x: x['id'], str) or video_id
|
||||
|
||||
|
|
Loading…
Reference in a new issue