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

Youtube Annotations no longer download, and give 405 error #22045

Closed
5 tasks done
Benjins opened this issue Aug 9, 2019 · 1 comment
Closed
5 tasks done

Youtube Annotations no longer download, and give 405 error #22045

Benjins opened this issue Aug 9, 2019 · 1 comment

Comments

@Benjins
Copy link

Benjins commented Aug 9, 2019

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2019.08.02
  • 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: ['--write-annotations', '--skip-download', '--verbose', 'https://www.youtube.com/watch?v=CwZdur1Pi3M']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.08.02
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] CwZdur1Pi3M: Downloading webpage
[youtube] CwZdur1Pi3M: Downloading video info webpage
[youtube] CwZdur1Pi3M: Downloading annotations
WARNING: Unable to download video annotations: HTTP Error 405: Method Not Allowed
[debug] Default format spec: best/bestvideo+bestaudio
[info] Writing video annotations to: Fiber vs. Copper; What do we really need-CwZdur1Pi3M.annotations.xml
WARNING: There are no annotations to write.

Description

The YouTube annotations endpoint no longer is a simple GET, but instead is a POST with some additional parameters and data. As a result, the annotations download fails. Here is an example:

youtube-dl --write-annotations --skip-download --verbose https://www.youtube.com/watch?v=CwZdur1Pi3M

The video does have annotations, and looking in the Chrome inspector they are downloaded during normal viewing in a browser, just with a different URL scheme than youtube-dl expects.

@ivan
Copy link
Contributor

ivan commented Aug 9, 2019

Testing it with curl a bit, the POST request to the endpoint e.g. https://www.youtube.com/annotations_invideo?cap_hist=1&video_id=uaK1TSAXRvA&client=1 seems to require:

  • a cookie with a valid VISITOR_INFO1_LIVE= and YSC=
  • POST data with a valid session_token=

But I may have missed an even more-minimized approach to get annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants