yt-dlp: [ARDBetaMediathek] HTTP Error 503: Service Unavailable ARD Mediathek
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 have updated yt-dlp to nightly or master (update instructions)
- 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
Germany
Provide a description that is worded well enough to be understood
The error shown below occurs:
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
$ python -m yt_dlp --verbose --ignore-config https://www.ardmediathek.de/video/Y3JpZDovL3RhZ2Vzc2NoYXUuZGUvNDc3M2U0ZjUtOGNkMi00OGQyLWE3NWUtMWMyNmVkZjFkY2ViLVNFTkRVTkdTVklERU8
[debug] Command-line config: ['--verbose', '--ignore-config', 'https://www.ardmediathek.de/video/Y3JpZDovL3RhZ2Vzc2NoYXUuZGUvNDc3M2U0ZjUtOGNkMi00OGQyLWE3NWUtMWMyNmVkZjFkY2ViLVNFTkRVTkdTVklERU8']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.11.16 from yt-dlp/yt-dlp [24f827875] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: 0b6f829b1
[debug] Python 3.11.6 (CPython x86_64 64bit) - Linux-6.5.0-14-generic-x86_64-with-glibc2.38 (OpenSSL 3.0.10 1 Aug 2023, glibc 2.38)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, pyxattr-0.8.1, requests-2.31.0, secretstorage-3.3.3, sqlite3-3.42.0, urllib3-1.26.16, websockets-10.4
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1792 extractors
[debug] Using fake IP 53.140.36.43 (DE) as X-Forwarded-For
[ARDBetaMediathek] Extracting URL: https://www.ardmediathek.de/video/Y3JpZDovL3RhZ2Vzc2NoYXUuZGUvNDc3M2U0ZjUtOGNkMi00OGQyLWE3NWUtMWMyNmVkZjFkY2ViLVNFTkRVTkdTVklERU8
[ARDBetaMediathek] Y3JpZDovL3RhZ2Vzc2NoYXUuZGUvNDc3M2U0ZjUtOGNkMi00OGQyLWE3NWUtMWMyNmVkZjFkY2ViLVNFTkRVTkdTVklERU8: Downloading JSON metadata
ERROR: [ARDBetaMediathek] Y3JpZDovL3RhZ2Vzc2NoYXUuZGUvNDc3M2U0ZjUtOGNkMi00OGQyLWE3NWUtMWMyNmVkZjFkY2ViLVNFTkRVTkdTVklERU8: Unable to download JSON metadata: HTTP Error 503: Service Unavailable (caused by <HTTPError 503: Service Unavailable>); 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 "/tmp/yt-dlp/yt_dlp/extractor/common.py", line 717, in extract
ie_result = self._real_extract(url)
^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/extractor/ard.py", line 595, in _real_extract
player_page = self._download_json(
^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/extractor/common.py", line 1071, in download_content
res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/extractor/common.py", line 1035, in download_handle
res = self._download_webpage_handle(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/extractor/common.py", line 905, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/extractor/common.py", line 862, in _request_webpage
raise ExtractorError(errmsg, cause=err)
File "/tmp/yt-dlp/yt_dlp/networking/_urllib.py", line 396, in _send
res = opener.open(urllib_req, timeout=float(request.extensions.get('timeout') or self.timeout))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/urllib/request.py", line 525, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/urllib/request.py", line 634, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/urllib/request.py", line 563, in error
return self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/lib/python3.11/urllib/request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/yt-dlp/yt_dlp/YoutubeDL.py", line 4069, in urlopen
return self._request_director.send(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/networking/common.py", line 114, in send
response = handler.send(request)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/networking/_helper.py", line 204, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/networking/common.py", line 325, in send
return self._send(request)
^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/networking/_urllib.py", line 401, in _send
raise HTTPError(UrllibResponseAdapter(e.fp), redirect_loop='redirect error' in str(e)) from e
yt_dlp.networking.exceptions.HTTPError: HTTP Error 503: Service Unavailable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/yt-dlp/yt_dlp/extractor/common.py", line 849, in _request_webpage
return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/yt-dlp/yt_dlp/YoutubeDL.py", line 4101, in urlopen
raise _CompatHTTPError(e) from e
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 503: Service Unavailable
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 11
- Comments: 33 (4 by maintainers)
Commits related to this issue
- [ie/ARD:mediathek] fixed "status code 513" error while retrieving json metadata And: added back public api code and integrated it with the fix for error 503 Squashed from https://github.com/yt-dlp/y... — committed to barsnick/yt-dlp by tb1402 6 months ago
- [ie/ARD] Overhaul extractors (#8878) Closes #8731, Closes #6784, Closes #2366, Closes #2975, Closes #8760 Authored by: seproDev — committed to yt-dlp/yt-dlp by seproDev 6 months ago
You can try to get the url of master.m3u8 from the browser network protocol when doing playback in the browser and pass that url as argument.
issue is still open (last update contains no fix), the workaround with master.m3u8 if anybody needs help:
Here is a very simple workaround that works for me.
This link to the latest Tatort on the ARD site gives a 503 error. https://www.ardmediathek.de/video/tatort/kontrollverlust/ard/Y3JpZDovL2Rhc2Vyc3RlLmRlL3RhdG9ydC8yMDIzLTEyLTI2XzIwLTE1LU1FWg
This link to exactly the same Tatort on ZDF’s site works. https://www.zdf.de/ard/tatort/page-video-ard-kontrollverlust-104.html
So just download it from ZDF instead. You can search their site for whatever you want and use their link.
(German public TV channels ZDF and ARD are working together. They are heading towards a single streaming service. Each site now allows you to search for and play the other site’s material. This is quite recent and may explain the changes at ARD. I have not come across any shows where I could not use this approach.)
@Gerd-Die If you don’t want to have the ID in the filename, you can use output templates. For example:
-o "%(title)s.%(ext)s"
You can also use output templates to add additional info like the series name.Thanks! Works fine now.
All these three work for me (with the patch)… I mean they start downloading at least (didn’t wait until the end).
https://github.com/barsnick/yt-dlp/commit/c02083f8d16c69d3570de5705557a29db7ee5ea2 fixes the issue for me, it seems.
Same here dvbtv@DVBTV:~/data/video/tvrec/Dahoam> yt-dlp --verbose https://www.ardmediathek.de/video/dahoam-is-dahoam/was-weg-is-is-weg-11-12-23-oder-folge-3275/br-fernsehen/Y3JpZDovL2JyLmRlL3ZpZGVvLzgzOGYyMzZiLTM1ZTAtNGZjYS05NTdiLTBiMTVhMWM5MTQyMA [debug] Command-line config: [‘–verbose’, ‘https://www.ardmediathek.de/video/dahoam-is-dahoam/was-weg-is-is-weg-11-12-23-oder-folge-3275/br-fernsehen/Y3JpZDovL2JyLmRlL3ZpZGVvLzgzOGYyMzZiLTM1ZTAtNGZjYS05NTdiLTBiMTVhMWM5MTQyMA’] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2023.11.16 from yt-dlp/yt-dlp [24f827875] (zip) [debug] Python 3.8.6 (CPython x86_64 64bit) - Linux-5.8.15-1-default-x86_64-with-glibc2.2.5 (OpenSSL 1.1.1h 22 Sep 2020, glibc 2.33) [debug] exe versions: ffmpeg 4.3.1 (fdk), ffprobe 4.3.1 [debug] Optional libraries: brotli-None, certifi-2020.12.05, requests-2.26.0, sqlite3-3.34.0, urllib3-1.26.2 [debug] Proxy map: {} [debug] Request Handlers: urllib [debug] Loaded 1901 extractors [debug] Using fake IP 53.159.33.191 (DE) as X-Forwarded-For [ARDBetaMediathek] Extracting URL: https://www.ardmediathek.de/video/dahoam-is-dahoam/was-weg-is-is-weg-11-12-23-oder-folge-3275/br-fernsehen/Y3JpZDovL2JyLmRlL3ZpZGVvLzgzOGYyMzZiLTM1ZTAtNGZjYS05NTdiLTBiMTVhMWM5MTQyMA [ARDBetaMediathek] dahoam-is-dahoam/was-weg-is-is-weg-11-12-23-oder-folge-3275/br-fernsehen: Downloading JSON metadata ERROR: [ARDBetaMediathek] Y3JpZDovL2JyLmRlL3ZpZGVvLzgzOGYyMzZiLTM1ZTAtNGZjYS05NTdiLTBiMTVhMWM5MTQyMA: Unable to download JSON metadata: HTTP Error 503: Service Unavailable (caused by <HTTPError 503: Service Unavailable>); 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 “/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py”, line 715, in extract ie_result = self._real_extract(url) File “/usr/local/bin/yt-dlp/yt_dlp/extractor/ard.py”, line 595, in _real_extract player_page = self._download_json( File “/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py”, line 1069, in download_content res = getattr(self, download_handle.name)(url_or_request, video_id, **kwargs) File “/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py”, line 1033, in download_handle res = self._download_webpage_handle( File “/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py”, line 903, in _download_webpage_handle urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status) File “/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py”, line 860, in _request_webpage raise ExtractorError(errmsg, cause=err)
File “/usr/local/bin/yt-dlp/yt_dlp/networking/_urllib.py”, line 396, in _send res = opener.open(urllib_req, timeout=float(request.extensions.get(‘timeout’) or self.timeout)) File “/usr/lib64/python3.8/urllib/request.py”, line 531, in open response = meth(req, response) File “/usr/lib64/python3.8/urllib/request.py”, line 640, in http_response response = self.parent.error( File “/usr/lib64/python3.8/urllib/request.py”, line 569, in error return self._call_chain(*args) File “/usr/lib64/python3.8/urllib/request.py”, line 502, in _call_chain result = func(*args) File “/usr/lib64/python3.8/urllib/request.py”, line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 503: Service Unavailable
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File “/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py”, line 4052, in urlopen return self._request_director.send(req) File “/usr/local/bin/yt-dlp/yt_dlp/networking/common.py”, line 114, in send response = handler.send(request) File “/usr/local/bin/yt-dlp/yt_dlp/networking/_helper.py”, line 204, in wrapper return func(self, *args, **kwargs) File “/usr/local/bin/yt-dlp/yt_dlp/networking/common.py”, line 325, in send return self._send(request) File “/usr/local/bin/yt-dlp/yt_dlp/networking/_urllib.py”, line 401, in _send raise HTTPError(UrllibResponseAdapter(e.fp), redirect_loop=‘redirect error’ in str(e)) from e yt_dlp.networking.exceptions.HTTPError: HTTP Error 503: Service Unavailable
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File “/usr/local/bin/yt-dlp/yt_dlp/extractor/common.py”, line 847, in _request_webpage return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query)) File “/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py”, line 4074, in urlopen raise _CompatHTTPError(e) from e yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 503: Service Unavailable