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

Making url 1 click downloadable for YouTube #9713

Closed
nadermx opened this issue Jun 6, 2016 · 2 comments
Closed

Making url 1 click downloadable for YouTube #9713

nadermx opened this issue Jun 6, 2016 · 2 comments

Comments

@nadermx
Copy link

@nadermx nadermx commented Jun 6, 2016

I'm running youtube-dl from a python script. Trying to emulate what keepvid and savefrom do, refrencing this issue, I noticed that when I run youtube-dl via command line with the -g attribute it gives me a url that if I put &title=whatever I can make it a 1 click downloadable show it.

But when I try and run to get the same url via forceurl in my python script none of the urls work that way, and they differ from the output url from -g.

Is there a different command I am suppose to use to emulate the -g and if so is there any way I can have it in one run show all the formats? Or do I have to run a new instance for each format?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 7, 2016

No difference. -g == forceurl. All formats are available in JSON output.

@dstftw dstftw closed this Jun 7, 2016
@nadermx
Copy link
Author

@nadermx nadermx commented Jun 7, 2016

What I don't understand is when I do forceurl I get a url like this

https://r8---sn-uqx2-aphs.googlevideo.com/videoplayback?sparams=dur%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&expire=1465354435&gcr=pe&lmt=1458229056639516&sver=3&initcwndbps=1167500&source=youtube&mt=1465332594&mv=m&fexp=9416126%2C9416891%2C9422596%2C9428398%2C9431012%2C9433096%2C9433380%2C9433946%2C9435527%2C9435876%2C9437066%2C9437553&ms=au&mm=31&mn=sn-uqx2-aphs&pl=20&id=o-AL5a3xChjUcgOT654uje1VFXeg1IjpX1ma9BypKZv-Md&requiressl=yes&ratebypass=yes&ip=190.42.8.241&upn=Jp83zTsnPtI&dur=21621.701&mime=video%2Fmp4&itag=22&key=yt6&signature=9F19C8A7886608AA56CDDF54F649CBB80225D0C2.281E96AACBD3A78E56784BCE9C78B92BF1A3E7D9

And this url works as a 1 click if you add title (obviously if it hasn't expired),
but when I do json output, I get a url like this

https://r8---sn-uqx2-aphs.googlevideo.com/videoplayback?upn=1LkBvi2clek&keepalive=yes&key=yt6&pl=20&initcwndbps=1167500&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&source=youtube&fexp=9416126%2C9416891%2C9422596%2C9428398%2C9431012%2C9432368%2C9433096%2C9433380%2C9433946%2C9435526%2C9435876%2C9437066%2C9437553&lmt=1458261632832400&ip=190.42.8.241&gcr=pe&expire=1465354491&id=o-AFImRUfUTC0YkPhJ9W3m7huNoepLuzu9SmdkPi-ojfjX&mn=sn-uqx2-aphs&mm=31&itag=133&gir=yes&sver=3&dur=21621.630&mv=m&mt=1465332594&ms=au&requiressl=yes&clen=659836477&mime=video%2Fmp4&ipbits=0&signature=9364CE357E36E4B4924AFD994D00CD1292D4AFE6.2978A0AFFDDC8E47B9A56957BFD394A1A7C799C6&ratebypass=yes

As you can see there is a difference of params in the url, as well as order of the urls in the second one that is given by the json output. And the 2nd one does not work as a downloadable.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.