-
Notifications
You must be signed in to change notification settings - Fork 84
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
Twitch changed the way on how downloading clips work. #64
Comments
Thanks for reporting, I'll need to investigate this. I can confirm that inspecting the page yields the working URL which looks like this: |
youtube-dl has the same problem ytdl-org/youtube-dl#29136 |
A temporary fix would be to add the arguments after the old download link. eg: The arguments can be constant but only valid for a day. The argument examle is: This can be used for any clips but only limited to a day. Example:
You could change [CLIP ID] to the clip you wish to download. It would work, but again, only valid for a day |
Another thing I've noticed is the eg: |
Also, the arguments are all linked up together. If you change one of them, it will not work |
i see a post to gql.twitch.tv/gql with body
(this sha256hash seems unchanged from slug to slug, no idea what it is)
which has the token and value that coincide with |
For now I've worked around it by adding: |
This is called a "Persisted Query" in GraphQL. Instead of sending a megabyte of newlines and GQL query data on every request (huge waste of bandwidth), you can store query server side and call it by its hashed value. |
Gah, they disabled query introspection. That makes it much harder to root around the API. |
It's not a clean solution perhaps, but the following patch fixes it for me:
I basically request both the clip details as twitch-dl already did, as well as the persisted query mentioned in ytdl-org/youtube-dl@9a71e3c, and then merge in the access token info, which is then used to add to the clip's download URL. I hope it helps with finding a cleaner solution. :) |
Thank you. That's very helpful. I'm busy these days but I'll try it out as soon as I get the chance. |
Thanks mate..any approx eta for this fix..fully understand that you're doing the as a favour for all of us but would be good to know as I used this in a project so can plan my work accordingly. Thank you and no rush. |
Sorry but I can't commit to a deadline. I just applied the patch, and it doesn't seem to work, I still get 0 bytes files. I haven't made any attempt to debug it yet though. |
No worries thanks a lot for all your help to all of us . I'll wait and
watch.
…On Wed, 2 Jun 2021, 4:19 pm Ivan Habunek, ***@***.***> wrote:
Sorry but I can't commit to a deadline. I just applied the patch, and it
doesn't seem to work, I still get 0 bytes files. I haven't made any attempt
to debug it yet though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQK74T37UHGYMEK3FNAW7PLTQZDXPANCNFSM45TJV23A>
.
|
huh, that's strange. I haven't used it again since I created the diff (at which point it was working for me), but I'll have a look at it tomorrow to see if something changed since. Edit: I just tried running However, Edit 2: hopefully I'll have some time tomorrow to change that too. |
This has been fixed in 1.16.0. Thanks to everyone who participated, you made it an easy fix. |
Twitch changed the way on how downloading clips work. The URL that you use to download the clips anymore does not work.
I find a way around this by going to the main clip URL: https://clips.twitch.tv/DependableAmazingOrcaLeeroyJenkins-M1Q94jy6g9UsbUqZ
Right-clicking it, Inspect Element, then opening the link that corresponds to the video. It is the same endpoint as the old one but Twitch made it so that it requires authorization shit
The text was updated successfully, but these errors were encountered: