Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
KeyError('@id',) youtube-dl [nrk] #25594
Comments
|
Your subject line should mention that the extractor is "[nrk]" (and you didn't follow the rules from the issue template). I have encountered this problem since yesterday on some of NRK's video's, most notably [NRKTVEpisodeIE], including its provided tests. It seems to be that "@id" is no longer provided in the embedded JSON. I was able to extract the first provided _TEST video ("Hellum's Kro") as well as another such video by modifying the video_id extraction:
Disclaimer: I cannot tell whether this breaks other videos, or whether both methods need to be provided, with one as fallback. It's just a proof of concept and "works for me"(TM) right now. |
|
Thank you for the answer! The error KeyError('@id',) appeared when I writed: "C:\Users\Admin\Desktop\yt-dl>youtube-dl --write-sub --sub-format ttml https://tv.nrk.no/serie/fra-boelle-til-bestevenn/sesong/1/episode/1/avspiller" in the Command prompt. Must I use another way? Can you paste the accurate text you used for Hellum's Kro? And what software to use? Where to put the command? Thank you in advance! |
|
I put the text you wrote in hellumskro.py, in Command prompt, and it says: C:\Users\Admin\Desktop>python hellumskro.py |
Actually, no. You must fix youtube-dl or wait for it to be fixed.
The fix I posted is a so-called diff. It's a textual instruction (which can be applied by developers, as they know how to) of what to change in youtube-dl's source code in order for this issue to go away. Since I'm running on Unix (Linux more precisely), it's easy to fix and run. I extracted the source code (or clone it from git), went into the source folder, applied the above fix, and then ran |
|
Implemented the quickfix for the '@id' error, now I'm getting 404 not found in stead: PS E:\git\youtube-dl> python.exe -m youtube_dl --write-sub https://tv.nrk.no/serie/foer-vi-doer/sesong/2/episode/1/avspiller |
I can reproduce this. This seems to be a different, additional issue. It happens on some series, not all. And of those failing have the |
C:\Users\Admin\Desktop\yt-dl>youtube-dl --write-sub --sub-format ttml https://tv.nrk.no/serie/fra-boelle-til-bestevenn/sesong/1/episode/1/avspiller [NRKTVEpisode] fra-boelle-til-bestevenn/sesong/1/episode/1: Downloading webpage ERROR: An extractor error has occurred. (caused by KeyError('@id',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Windows 7 64 bit. Youtube-dl is up-to-date 2020.06.06. I can download some videos from the same website.
Please help me!