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

[Vimeo] Unable to download JSON metadata: HTTP Error 404: Not Found #31406

Closed
5 tasks done
shawnthroop opened this issue Dec 9, 2022 · 6 comments
Closed
5 tasks done
Labels
broken-IE problem with existing site extraction duplicate fixed

Comments

@shawnthroop
Copy link

shawnthroop commented Dec 9, 2022

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.12.17
  • 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

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-F', 'https://vimeo.com/766041601/7921871968']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: 001bacee1
[debug] Python version 3.11.0 (CPython) - macOS-12.6-arm64-arm-64bit
[debug] exe versions: ffmpeg 5.1.2, ffprobe 5.1.2
[debug] Proxy map: {}
[vimeo] 7921871968: Downloading webpage
[vimeo] 7921871968: Downloading JSON metadata
[vimeo] 7921871968: Downloading JSON metadata
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.11/site-packages/youtube_dl/extractor/common.py", line 634, in _request_webpage
    return self._downloader.urlopen(url_or_request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.11/site-packages/youtube_dl/YoutubeDL.py", line 2288, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.0/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

Description

I'm trying to download two videos:

  1. https://vimeo.com/766059936/ccc6847935 (success!)
  2. https://vimeo.com/766041601/7921871968 (fails, verbose log provided above)

Thoughts:

I've searched through the open/closed issues, there seem to be a lot similar to this but not quite this.

  • I'm not sure if the architecture makes a difference but I installed youtube-dl using homebrew on Apple M2.
  • I think it might have something to do with the ID being all numerical values, that seems to be a common problem.
  • [debug] Python version 3.11.0 ... seems weird considering the requirements stated at the very top of the download page: 2.6, 2.7, or 3.2+

Not sure where to go from here, any advice is appreciated.

@dirkf
Copy link
Contributor

dirkf commented Dec 9, 2022

... a lot similar to this but not quite this.

No, not that because it's a different site. Normally the same diagnostic has a different explanation depending on the site because the extractor code is different. Unfortunately error occurs in a context that's too deeply nested to show the extractor code /opt/homebrew/Cellar/youtube-dl/2021.12.17/libexec/lib/python3.11/site-packages/youtube_dl/extractor/vimeo.py in the traceback.

...installed youtube-dl using homebrew on Apple M2.

That's fine, although yt-dl is a pure Python program and doesn't need the build functions of HB.

...it might have something to do with the ID being all numerical values ...

Yes. Actually it's because the last 2 URL components are both numeric. A possible work-around is to pass cookies from a logged-in Vimeo browser session and omit the penultimate component (https://vimeo.com/7921871968).

...[debug] Python version 3.11.0 ... seems weird ...

Here 3.11 > 3.2 since the version numbers aren't real decimals (like "macOS" 10.7 < 10.15, Snow Leopard < Catalina)

The issue is a duplicate of #29690 which was fixed in the git master in February.

Until the next release you could replace the extractor file (mentioned above) with the latest version https://github.com/ytdl-org/youtube-dl/raw/master/youtube_dl/extractor/vimeo.py, or (recommended) install the entire latest version of yt-dl using pip. Either way you will also fix the newer problem #31311.

@shawnthroop
Copy link
Author

Thanks for such a quick and informative reply.

That's fine, although yt-dl is a pure Python program and doesn't need the build functions of HB

Ahh good to know. I tried installing youtube-dl direct from the homepage and it also encountered the same issue.

A possible work-around is to pass cookies from a logged-in Vimeo browser session and omit the penultimate component (https://vimeo.com/7921871968).

I saw something mentioned in another issue but didn't fully understand the --cookies flag or how it could help. I will first try installing youtube-dl using pip like you recommend.

@shawnthroop
Copy link
Author

I'm not a huge command line guy so this took me a second but in the end installing the latest version of youtube-dl using pip solved the issue like you recommended. Thanks again.

This is a little off topic but I have managed to install youtube-dl in ~/Library/Python/3.9/bin/. This seems wrong, where should it be installed? /user/local/bin?

@dirkf
Copy link
Contributor

dirkf commented Dec 9, 2022

The location depends on how yt-dl was installed. I infer that Homebrew packages yt-dl with Python 3.11 while what runs when you say python ... is Python 3.9. Either is fine, since Python hasn't yet been evolved so far that the 2/3-compatible subset used in yt-dl is unacceptable.

@shawnthroop
Copy link
Author

Good to know. I think homebrew might be the best solution for me in the long run. For now, using pip, I've installed https://github.com/ytdl-org/youtube-dl/archive/refs/heads/master.tar.gz and it places it in ~/Library/Python/3.9/bin. So, I just updated my $PATH to include that and it all seems to be working smoothly now.

Thanks again for all the help. I really appreciate it

@dirkf
Copy link
Contributor

dirkf commented Dec 9, 2022

Or in your ~/.zshrc:
alias youtube-dl="~/Library/Python/3.9/bin/youtube-dl"

🎅

@dirkf dirkf added broken-IE problem with existing site extraction duplicate fixed labels Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broken-IE problem with existing site extraction duplicate fixed
Projects
None yet
Development

No branches or pull requests

2 participants