yt-dlp: [DRTV] Unable to download JSON metadata: HTTP Error 404 (dr.dk)
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- I understand that I will be blocked if I intentionally remove or skip any mandatory* field
Checklist
- I’m reporting that yt-dlp is broken on a supported site
- I’ve verified that I’m running yt-dlp version 2023.09.24 (update instructions) or later (specify commit)
- I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
Denmark
Provide a description that is worded well enough to be understood
Downloading from “https://www.dr.dk/drtv/tv-guide” (Supported site “DRTV”) was no problem 3 days ago. Since then, attempts to download previous broadcasts have resulted in the following error:
Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>)
A test can be done with this url: yt-dlp.exe “https://www.dr.dk/drtv/se/alene-i-vildmarken_-opfindsomme-shelters_169521”
Downloading something from “https://www.dr.dk/drtv/tv-guide” 5 minutes after a direct transmission ends is no problem. I think that the transmission then is transcoded into different formats, and these transcoded formats can no longer be downloaded because of a missing JSON.
Provide verbose output that clearly demonstrates the problem
- Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>
) - If using API, add
'verbose': True
toYoutubeDL
params instead - Copy the WHOLE output (starting with
[debug] Command-line config
) and insert it below
Complete Verbose Output
yt-dlp.exe -vU "https://www.dr.dk/drtv/se/alene-i-vildmarken_-opfindsomme-shelters_169521"
[debug] Command-line config: ['-vU', 'https://www.dr.dk/drtv/se/alene-i-vildmarken_-opfindsomme-shelters_169521']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.10.04.180415 [b095fd3fa] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.22621-SP0 (OpenSSL 1.1.1k 25 Mar 2021)
[debug] exe versions: ffmpeg 2022-03-07-git-e645a1ddb9-essentials_build-www.gyan.dev (setts), ffprobe 2022-03-07-git-e645a1ddb9-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.19.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, sqlite3-3.35.5, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1886 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Available version: nightly@2023.10.04.180415, Current version: nightly@2023.10.04.180415
Current Build Hash: 00fc0b80ab8bf1f1d3acc7002a6f078bb0574f63e6a6e2dcf18d82e736c9f482
yt-dlp is up to date (nightly@2023.10.04.180415)
[drtv] Extracting URL: https://www.dr.dk/drtv/se/alene-i-vildmarken_-opfindsomme-shelters_169521
[drtv] alene-i-vildmarken_-opfindsomme-shelters_169521: Downloading webpage
[drtv] 00922000810: Downloading video JSON
ERROR: [drtv] alene-i-vildmarken_-opfindsomme-shelters_169521: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
File "yt_dlp\extractor\common.py", line 715, in extract
File "yt_dlp\extractor\drtv.py", line 203, in _real_extract
File "yt_dlp\extractor\common.py", line 1069, in download_content
File "yt_dlp\extractor\common.py", line 1033, in download_handle
File "yt_dlp\extractor\common.py", line 903, in _download_webpage_handle
File "yt_dlp\extractor\common.py", line 860, in _request_webpage
File "yt_dlp\networking\_urllib.py", line 410, in _send
File "urllib\request.py", line 531, in open
File "urllib\request.py", line 640, in http_response
File "urllib\request.py", line 569, in error
File "urllib\request.py", line 502, in _call_chain
File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "yt_dlp\YoutubeDL.py", line 4051, in urlopen
File "yt_dlp\networking\common.py", line 114, in send
File "yt_dlp\networking\_helper.py", line 204, in wrapper
File "yt_dlp\networking\common.py", line 325, in send
File "yt_dlp\networking\_urllib.py", line 415, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 404: Not Found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "yt_dlp\extractor\common.py", line 847, in _request_webpage
File "yt_dlp\YoutubeDL.py", line 4070, in urlopen
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 404: Not Found
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 5
- Comments: 17 (4 by maintainers)
I am close to finalizing my work to fix the DRTV extractor in PR #8484 and hope to have it ready soon.
The extractor still needs to be fixed in this project. I was only linking the upstream issue to share information. Reopening
@garret1317 regarding the tag: drtv may be geoblocked from abroad, but the problem is also present when trying to download from Denmark.
On Linux the verbose output is:
It has nothing to do with geo-restrictions. DRTV has changed the way the site works, which has coursed problems - not only for yt-dlp but also for similar programs like for example TV4ever.
I’m pretty sure the content that isn’t geo-restricted has the same problem. For example: https://www.dr.dk/drtv/episode/explainer_-hvordan-fjerner-man-co2-fra-luften_409062
see also https://github.com/ytdl-org/youtube-dl/issues/32581