[Vimeo] HTTP Error 406: Not Acceptable when downloading video #26983

Open
opened 2026-02-21 14:35:03 -05:00 by deekerman · 10 comments
Owner

Originally created by @salty-horse on GitHub (Oct 23, 2024).

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.12.17 (Also tried latest git)
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

$ youtube-dl -v -x 'https://vimeo.com/9010456'
[debug] System config: []
[debug] User config: ['--socket-timeout=2']
[debug] Custom config: []
[debug] Command-line args: ['-v', '-x', 'https://vimeo.com/9010456']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: a70dc03d2
[debug] Python 3.12.7 (CPython x86_64 64bit) - Linux-6.11.0-9-generic-x86_64-with-glibc2.40 - OpenSSL 3.3.1 4 Jun 2024 - glibc 2.40
[debug] exe versions: ffmpeg 7.0.2, ffprobe 7.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[vimeo] 9010456: Downloading webpage
[vimeo] 9010456: Downloading JSON metadata
[vimeo] 9010456: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; see  https://github.com/ytdl-org/youtube-dl/#user-content-installation  on how to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
  File "/home/ori/devel/youtube-dl/youtube_dl/extractor/common.py", line 679, in _request_webpage
    return self._downloader.urlopen(url_or_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ori/devel/youtube-dl/youtube_dl/YoutubeDL.py", line 2496, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 521, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 630, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 559, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.12/urllib/request.py", line 639, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

Description

I think Vimeo added some protections, and youtube-dl needs to adapt. For a while it returned 403 Forbidden and 429 Too Many Requests, and now it's returning 406.

I don't think it's related to #26421 from 2020, as, IIRC, I managed to download from Vimeo between then and now.

yt-dlp successfully downloaded the video, and they have made changes to the Vimeo extractor in the past year, particularly adding browser impersonation. (See https://github.com/yt-dlp/yt-dlp/issues/10325)

Originally created by @salty-horse on GitHub (Oct 23, 2024). ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm reporting a broken site support - [x] I've verified that I'm running youtube-dl version **2021.12.17** (Also tried latest git) - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar issues including closed ones ## Verbose log ``` $ youtube-dl -v -x 'https://vimeo.com/9010456' [debug] System config: [] [debug] User config: ['--socket-timeout=2'] [debug] Custom config: [] [debug] Command-line args: ['-v', '-x', 'https://vimeo.com/9010456'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2021.12.17 [debug] Git HEAD: a70dc03d2 [debug] Python 3.12.7 (CPython x86_64 64bit) - Linux-6.11.0-9-generic-x86_64-with-glibc2.40 - OpenSSL 3.3.1 4 Jun 2024 - glibc 2.40 [debug] exe versions: ffmpeg 7.0.2, ffprobe 7.0.2, rtmpdump 2.4 [debug] Proxy map: {} [vimeo] 9010456: Downloading webpage [vimeo] 9010456: Downloading JSON metadata [vimeo] 9010456: Downloading JSON metadata ERROR: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; see https://github.com/ytdl-org/youtube-dl/#user-content-installation on how to update. Be sure to call youtube-dl with the --verbose option and include the complete output. File "/home/ori/devel/youtube-dl/youtube_dl/extractor/common.py", line 679, in _request_webpage return self._downloader.urlopen(url_or_request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ori/devel/youtube-dl/youtube_dl/YoutubeDL.py", line 2496, in urlopen return self._opener.open(req, timeout=self._socket_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 521, in open response = meth(req, response) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 630, in http_response response = self.parent.error( ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 559, in error return self._call_chain(*args) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain result = func(*args) ^^^^^^^^^^^ File "/usr/lib/python3.12/urllib/request.py", line 639, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) ``` ## Description I think Vimeo added some protections, and youtube-dl needs to adapt. For a while it returned 403 Forbidden and 429 Too Many Requests, and now it's returning 406. I don't think it's related to #26421 from 2020, as, IIRC, I managed to download from Vimeo between then and now. `yt-dlp` successfully downloaded the video, and they have made changes to the Vimeo extractor in the past year, particularly adding browser impersonation. (See https://github.com/yt-dlp/yt-dlp/issues/10325)
Author
Owner

@dirkf commented on GitHub (Oct 23, 2024):

From recollection of yt-dlp issues, 406 might just mean that we're not asking for Content-Type: application/json, but it's going to be tricky to handle anything that needs impersonation:

  1. a function like --external-requester ... would have to be implemented
  2. even if that were done, the required dependencies for curl-ffi mean that users could use yt-dlp instead with a better UI.

Any further data points regarding Vimeo are welcome as I won't have popped the stack down to my Vimeo WIP for a while.

@dirkf commented on GitHub (Oct 23, 2024): From recollection of _yt-dlp_ issues, 406 might just mean that we're not asking for `Content-Type: application/json`, but it's going to be tricky to handle anything that needs impersonation: 1. a function like `--external-requester ...` would have to be implemented 2. even if that were done, the required dependencies for _curl-ffi_ mean that users could use _yt-dlp_ instead with a better UI. Any further data points regarding Vimeo are welcome as I won't have popped the stack down to my Vimeo WIP for a while.
Author
Owner

@salty-horse commented on GitHub (Oct 23, 2024):

That's very reasonable.

I didn't know what to do about this issue for a while now. If you decide not to support it, would you consider improving the error message, suggesting other tools? It would really help lost users.

BTW, I have this PR #26636 about a improving different Vimeo error message that's been patiently waiting for attention :)

@salty-horse commented on GitHub (Oct 23, 2024): That's very reasonable. I didn't know what to do about this issue for a while now. If you decide not to support it, would you consider improving the error message, suggesting other tools? It would really help lost users. BTW, I have this PR #26636 about a improving different Vimeo error message that's been patiently waiting for attention :)
Author
Owner

@dirkf commented on GitHub (Oct 24, 2024):

Anyhow, yt-dlp/yt-dlp#9125 was the fix there.

@dirkf commented on GitHub (Oct 24, 2024): Anyhow, yt-dlp/yt-dlp#9125 was the fix there.
Author
Owner

@dirkf commented on GitHub (Oct 24, 2024):

And then:

$ python -m youtube_dl -vF 'https://vimeo.com/9010456'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-vF', u'https://vimeo.com/9010456']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: f7dc45d3a
[debug] Python 2.7.15 (CPython i686 32bit) - Linux-6.1.0-25-686-pae-i686-with-debian-12.7 - OpenSSL 1.1.1a  20 Nov 2018 - glibc 2.1.3
[debug] exe versions: ffmpeg 5.1.6-0, ffprobe 5.1.6-0
[debug] Proxy map: {}
[vimeo] 9010456: Downloading webpage
[vimeo] 9010456: Downloading JSON metadata
[vimeo] 9010456: Downloading JSON metadata
[vimeo] 9010456: Downloading JSON metadata
[vimeo] 9010456: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 9010456: Downloading fastly_skyfire m3u8 information
[vimeo] 9010456: Downloading akfire_interconnect_quic MPD information
WARNING: [vimeo] 9010456: Failed to parse XML not well-formed (invalid token): line 1, column 0
[vimeo] 9010456: Downloading fastly_skyfire MPD information
WARNING: [vimeo] 9010456: Failed to parse XML not well-formed (invalid token): line 1, column 0
[info] Available formats for 9010456:
format code                                       extension  resolution note
hls-akfire_interconnect_quic-audio-high-Original  mp4        audio only 
hls-fastly_skyfire-audio-high-Original            mp4        audio only 
hls-akfire_interconnect_quic-318                  mp4        360x272     318k , avc1.64001F, 30.0fps, video only
hls-fastly_skyfire-318                            mp4        360x272     318k , avc1.64001F, 30.0fps, video only
http-240p                                         mp4        360x272    30fps (best)
$
@dirkf commented on GitHub (Oct 24, 2024): And then: ```console $ python -m youtube_dl -vF 'https://vimeo.com/9010456' [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-vF', u'https://vimeo.com/9010456'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2021.12.17 [debug] Git HEAD: f7dc45d3a [debug] Python 2.7.15 (CPython i686 32bit) - Linux-6.1.0-25-686-pae-i686-with-debian-12.7 - OpenSSL 1.1.1a 20 Nov 2018 - glibc 2.1.3 [debug] exe versions: ffmpeg 5.1.6-0, ffprobe 5.1.6-0 [debug] Proxy map: {} [vimeo] 9010456: Downloading webpage [vimeo] 9010456: Downloading JSON metadata [vimeo] 9010456: Downloading JSON metadata [vimeo] 9010456: Downloading JSON metadata [vimeo] 9010456: Downloading akfire_interconnect_quic m3u8 information [vimeo] 9010456: Downloading fastly_skyfire m3u8 information [vimeo] 9010456: Downloading akfire_interconnect_quic MPD information WARNING: [vimeo] 9010456: Failed to parse XML not well-formed (invalid token): line 1, column 0 [vimeo] 9010456: Downloading fastly_skyfire MPD information WARNING: [vimeo] 9010456: Failed to parse XML not well-formed (invalid token): line 1, column 0 [info] Available formats for 9010456: format code extension resolution note hls-akfire_interconnect_quic-audio-high-Original mp4 audio only hls-fastly_skyfire-audio-high-Original mp4 audio only hls-akfire_interconnect_quic-318 mp4 360x272 318k , avc1.64001F, 30.0fps, video only hls-fastly_skyfire-318 mp4 360x272 318k , avc1.64001F, 30.0fps, video only http-240p mp4 360x272 30fps (best) $ ```
Author
Owner

@salty-horse commented on GitHub (Oct 24, 2024):

I fixed it myself just as you posted this :) github.com/salty-horse/youtube-dl@9a45840135

@salty-horse commented on GitHub (Oct 24, 2024): I fixed it myself just as you posted this :) https://github.com/salty-horse/youtube-dl/commit/9a458401358b52a8b606e23763ab1a9a0a313425
Author
Owner

@nandaccio commented on GitHub (Aug 22, 2025):

I just compiled the latest version (as of August 22, 2025), and I’m getting an <HTTPError 406: 'Not Acceptable'> error:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-vF', 'https://vimeo.com/1111741532']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2025.04.07
[debug] Single file build
[debug] Python 3.11.0 (CPython AMD64 64bit) - Windows-10-10.0.22631 - OpenSSL 1.1.1q  5 Jul 2022
[debug] exe versions: none
[debug] Proxy map: {}
[vimeo] 1111741532: Downloading webpage
[vimeo] 1111741532: Downloading JSON metadata
[vimeo] 1111741532: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose option and include the complete output.
  File "youtube_dl\extractor\common.pyc", line 681, in _request_webpage
  File "youtube_dl\YoutubeDL.pyc", line 2503, in urlopen
  File "urllib\request.pyc", line 525, in open
  File "urllib\request.pyc", line 634, in http_response
  File "urllib\request.pyc", line 563, in error
  File "urllib\request.pyc", line 496, in _call_chain
  File "urllib\request.pyc", line 643, in http_error_default
@nandaccio commented on GitHub (Aug 22, 2025): I just compiled the latest version (as of August 22, 2025), and I’m getting an <HTTPError 406: 'Not Acceptable'> error: ``` [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-vF', 'https://vimeo.com/1111741532'] [debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252 [debug] youtube-dl version 2025.04.07 [debug] Single file build [debug] Python 3.11.0 (CPython AMD64 64bit) - Windows-10-10.0.22631 - OpenSSL 1.1.1q 5 Jul 2022 [debug] exe versions: none [debug] Proxy map: {} [vimeo] 1111741532: Downloading webpage [vimeo] 1111741532: Downloading JSON metadata [vimeo] 1111741532: Downloading JSON metadata ERROR: Unable to download JSON metadata: HTTP Error 406: Not Acceptable (caused by <HTTPError 406: 'Not Acceptable'>); please report this issue on https://github.com/ytdl-org/youtube-dl/issues , using the appropriate issue template. Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose option and include the complete output. File "youtube_dl\extractor\common.pyc", line 681, in _request_webpage File "youtube_dl\YoutubeDL.pyc", line 2503, in urlopen File "urllib\request.pyc", line 525, in open File "urllib\request.pyc", line 634, in http_response File "urllib\request.pyc", line 563, in error File "urllib\request.pyc", line 496, in _call_chain File "urllib\request.pyc", line 643, in http_error_default ```
Author
Owner

@dirkf commented on GitHub (Aug 22, 2025):

Try adding the commit linked above:

diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index 47ec0a9b449..3af1ba9a353 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -612,6 +612,7 @@ def _extract_from_api(self, video_id, unlisted_hash=None):
         video = self._download_json(
             api_url, video_id, headers={
                 'Authorization': 'jwt ' + token,
+                'Accept': 'application/json',
             }, query={
                 'fields': 'config_url,created_time,description,license,metadata.connections.comments.total,metadata.connections.likes.total,release_time,stats.plays',
             })

Basically this is nonsense. We always send */* as a (lower priority) acceptable content-type. This obviously includes application/json doesn't it, Vimeo? We've even gone to the trouble of preparing and sending the JWT that they want. Considering whether to make application/json the highest priority acceptable content-type for _download_json(), this is an example of why it's not worthwhile.

Even with this fix Vimeo may reject you for not appearing to use the HTTPS of some select set of browsers to access the site.

@dirkf commented on GitHub (Aug 22, 2025): Try adding the commit linked [above](https://github.com/ytdl-org/youtube-dl/issues/32959#issuecomment-2434747321): ```diff diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 47ec0a9b449..3af1ba9a353 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -612,6 +612,7 @@ def _extract_from_api(self, video_id, unlisted_hash=None): video = self._download_json( api_url, video_id, headers={ 'Authorization': 'jwt ' + token, + 'Accept': 'application/json', }, query={ 'fields': 'config_url,created_time,description,license,metadata.connections.comments.total,metadata.connections.likes.total,release_time,stats.plays', }) ``` Basically this is [nonsense](https://github.com/yt-dlp/yt-dlp/pull/9125#issuecomment-1924961666). We always send `*/*` as a (lower priority) acceptable `content-type`. This obviously includes `application/json` **doesn't it, Vimeo?** We've even gone to the trouble of preparing and sending the JWT that they want. Considering whether to make `application/json` the highest priority acceptable `content-type` for `_download_json()`, this is an example of why it's not worthwhile. Even with this fix Vimeo may reject you for not appearing to use the HTTPS of some select set of browsers to access the site.
Author
Owner

@kinow commented on GitHub (Aug 29, 2025):

Just had this problem, found this problem and tried @dirkf 's patch and that worked! Thank you @dirkf 🥇

@kinow commented on GitHub (Aug 29, 2025): Just had this problem, found this problem and tried @dirkf 's patch and that worked! Thank you @dirkf 🥇
Author
Owner

@applematt commented on GitHub (Sep 8, 2025):

I, too, just ran into this problem. Thanks for the fix @dirkf 💯

@applematt commented on GitHub (Sep 8, 2025): I, too, just ran into this problem. Thanks for the fix @dirkf 💯
Author
Owner

@dirkf commented on GitHub (Sep 9, 2025):

Credit goes to yt-dlp maintainer bashonly.

@dirkf commented on GitHub (Sep 9, 2025): Credit goes to yt-dlp maintainer bashonly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#26983
No description provided.