Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRK Nett-Tv #18304

Closed
snippsat opened this issue Nov 26, 2018 · 5 comments
Closed

NRK Nett-Tv #18304

snippsat opened this issue Nov 26, 2018 · 5 comments

Comments

@snippsat
Copy link

@snippsat snippsat commented Nov 26, 2018

A lot has stop working on there site,some still work.
For me it look like all url address which end in MUHU1100...,dos not work.
Url adress that ends in avspiller work.

Her a test,i use virtual environment with Python 3.7.

Work:

(youtube_env) C:\code\youtube_env
λ youtube-dl https://tv.nrk.no/serie/unge-lovende/sesong/1/episode/3/avspiller
[NRKTVEpisode] unge-lovende/sesong/1/episode/3: Downloading webpage
[NRK] KMTE20000314: Downloading mediaelement JSON
[NRK] KMTE20000314: Downloading f4m manifest
[NRK] KMTE20000314: Downloading m3u8 information
[download] Downloading playlist: Unge lovende 3:6
[NRK] playlist Unge lovende 3:6: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 176
[download] Destination: Unge lovende 3_6-KMTE20000314AA.mp4
[download]   1.5% of ~538.19MiB at  1.17MiB/s ETA 08:31

Dos not work:

(youtube_env) C:\code\youtube_env
λ youtube-dl https://tv.nrk.no/serie/nytt-paa-nytt/2018/MUHH50003318
[NRKTVSeries] nytt-paa-nytt: Downloading webpage
[download] Downloading playlist: NRK TV – Nytt på nytt
[NRKTVSeries] playlist NRK TV – Nytt på nytt: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: NRK TV – Nytt på nytt

Work:
λ youtube-dl https://tv.nrk.no/serie/side-om-side/sesong/6/episode/1/avspiller
Dos not work:
λ youtube-dl https://tv.nrk.no/serie/lindmo/2018/MUHU11006318

@Arnvidr
Copy link

@Arnvidr Arnvidr commented Dec 1, 2018

For reference, this affects version 2018.11.23, and an URL like this doesn't work either:
https://tv.nrk.no/serie/nytt-paa-nytt/2018/MUHH50003418/avspiller
Same message about collecting 0 video ids.

Output of --write-pages for the above url attached.
ytdump.zip

@Arnvidr
Copy link

@Arnvidr Arnvidr commented Dec 1, 2018

I managed to download the video above through inspecting through the firefox a playlist xhr request, and ran what I found:
youtube-dl "https://httpcache0-47115-cacheod0.dna.qbrick.com/47115-cacheod1/490363/0/hls/muhh50003418/playlist.m3u8?b=10-3500&bw_start=1200&no_audio_only&no_iframes&no_subtitles"

@barsnick
Copy link

@barsnick barsnick commented Dec 3, 2018

I figured out that it's only the URL scheme that is different. If the URL properly gets recognized as a NRKTVEpisode (not NRKTVSeries), it will download just fine. Here's my fix:

diff --git a/youtube_dl/extractor/nrk.py b/youtube_dl/extractor/nrk.py
index a231735fb..ef452c7d7 100644
--- a/youtube_dl/extractor/nrk.py
+++ b/youtube_dl/extractor/nrk.py
@@ -366,7 +366,7 @@ class NRKTVIE(NRKBaseIE):


 class NRKTVEpisodeIE(InfoExtractor):
-    _VALID_URL = r'https?://tv\.nrk\.no/serie/(?P<id>[^/]+/sesong/\d+/episode/\d+)'
+    _VALID_URL = r'https?://tv\.nrk\.no/serie/(?P<id>[^/]+/(sesong/\d+/episode/\d+|\d+/[a-zA-Z]{4}\d{8}(/avspiller)?))'
     _TEST = {
         'url': 'https://tv.nrk.no/serie/backstage/sesong/1/episode/8',
         'info_dict': {

Note this may break actual series. I didn't run the test suite or anything, I only downloaded Lindmo and Nytt på nytt. ;-)

@evexoio
Copy link

@evexoio evexoio commented Dec 3, 2018

@barsnick are you willing to make a PR?

@barsnick
Copy link

@barsnick barsnick commented Dec 3, 2018

@barsnick are you willing to make a PR?

Sure, will do. I will try to improve the _VALID_URL furthermore, and run the tests. Too bad the currently provided tests already fail. ;-)

@remitamine remitamine mentioned this issue Dec 5, 2018
5 of 9 tasks complete
@dstftw dstftw closed this in 33cc1ea Dec 6, 2018
@barsnick barsnick mentioned this issue Sep 16, 2019
5 of 9 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.