Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 25, 2020. It is now read-only.

Videos with decrypted signatures return 403 error #4

Closed
TheBlueSky opened this issue Mar 28, 2014 · 2 comments
Closed

Videos with decrypted signatures return 403 error #4

TheBlueSky opened this issue Mar 28, 2014 · 2 comments

Comments

@TheBlueSky
Copy link

Some videos has "use_cipher_signature" set to "True" (in get_video_info page). yturl does not work correctly for these videos.

What I mean, although yturl returns a video URL, using this URL will return 403 (Forbidden) HTTP error.

For these video, there are different algorithms to decipher the signature. The algorithms will swap different signature string parts, slice them and reverse them. Unfortunately there are many of them and what's even worst is they exist only (as far as I know) in a JavaScript tag in the video page.

I'm not sure if there is a "documentation" somewhere for the list of the algorithms, but the current way is to parse the video page, read the JavaScript and get the algorithm! I hope someone has a better way.

P.S., an example of such video: http://www.youtube.com/watch?v=q5qXTif2XE8

@cdown
Copy link
Owner

cdown commented Mar 28, 2014

Thanks for the report, I had read that alongside the API change to not use a separate signature change, others were having problems with some videos.

I see the signature decoding code in the player javascript, but that makes the situation a little more difficult. I'm guessing most people are maintaining an internal list of the algorithms?

I will take a look at what happened with youtube-dl: ytdl-org/youtube-dl#897

@cdown
Copy link
Owner

cdown commented Jul 28, 2015

This is quite complex work, especially on a moving and undocumented target.

Here's how youtube-dl is doing it nowadays: https://github.com/rg3/youtube-dl/blob/4c6bd5b5b61adfd912e14f8d704fde47628d164e/youtube_dl/extractor/youtube.py#L688

I'd probably be open to a patch that includes support, although I'd have to think about it. I'm not really interested in engaging in a game of cat-and-mouse with YouTube :-)

Closing out for now since I'm not going to work on it, but feel free to reopen/discuss further if anyone has interest in implementing it.

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

No branches or pull requests

2 participants