Comments (35)
You'll have to be more specific - what did you try to do, and what was not working?
I just used it this morning and it is working fine.
from youtube-downloader.
hello, try it yourself http://inbuzunar.mobi/youtube/getvideo.php?videoid=IqEyLPCmQps&type=Download I'm getting a blank page
De la: John Eckman [email protected]
Către: jeckman/YouTube-Downloader [email protected]
Cc: cristianpana [email protected]
Trimis: Joi, 14 Februarie 2013 15:54:00
Subiect: Re: [YouTube-Downloader] Not working (#1)
You'll have to be more specific - what did you try to do, and what was not working?
I just used it this morning and it is working fine.
—
Reply to this email directly or view it on GitHub.
from youtube-downloader.
Just went to that URL and it works fine for me get a list of 12 versions available for download. Maybe the video in question is geographically restricted? Can you go to http://www.youtube.com/watch?v=IqEyLPCmQps and watch the video there?
from youtube-downloader.
Yes, i can watch that video because it from my country Romania ;) So where it the problem because it not working for me :)
De la: John Eckman [email protected]
Către: jeckman/YouTube-Downloader [email protected]
Cc: cristianpana [email protected]
Trimis: Joi, 14 Februarie 2013 21:10:33
Subiect: Re: [YouTube-Downloader] Not working (#1)
Just went to that URL and it works fine for me get a list of 12 versions available for download. Maybe the video in question is geographically restricted? Can you go to http://www.youtube.com/watch?v=IqEyLPCmQps and watch the video there?
—
Reply to this email directly or view it on GitHub.
from youtube-downloader.
Well, ordinarily I would say look at your server error log, but but since it works fine for me at the url you provided I'm at a loss for where to begin.
Is this not what you see?:
from youtube-downloader.
My friend i see the links, i can see the video on youtube but when i click to download i'm getting a blank page...something like session expired. You want acces to my site to take a look?
De la: John Eckman [email protected]
Către: jeckman/YouTube-Downloader [email protected]
Cc: cristianpana [email protected]
Trimis: Joi, 14 Februarie 2013 23:18:30
Subiect: Re: [YouTube-Downloader] Not working (#1)
Well, ordinarily I would say look at your server error log, but but since it works fine for me at the url you provided I'm at a loss for where to begin.
Is this not what you see?:
—
Reply to this email directly or view it on GitHub.
from youtube-downloader.
Hmm - when I try to use one of the links in your site I get an HTTP 403 status error - not authorized/you may need to sign in.
But when I put the same video into the same script on my site: http://johneckman.com/yt/getvideo.php?videoid=IqEyLPCmQps&type=Download
It works fine. Try using my url.
from youtube-downloader.
Hmm still blank page on your site too :)
De la: John Eckman [email protected]
Către: jeckman/YouTube-Downloader [email protected]
Cc: cristianpana [email protected]
Trimis: Joi, 14 Februarie 2013 23:36:32
Subiect: Re: [YouTube-Downloader] Not working (#1)
Hmm - when I try to use one of the links in your site I get an HTTP 403 status error - not authorized/you may need to sign in.
But when I put the same video into the same script on my site: http://johneckman.com/yt/getvideo.php?videoid=IqEyLPCmQps&type=Download
It works fine. Try using my url.
—
Reply to this email directly or view it on GitHub.
from youtube-downloader.
Odd - still works fine for me - even tried a few different browsers to ensure it wasn't some issue with me being logged into to youtube or something.
Do you have python on your server? Can you try https://github.com/rg3/youtube-dl - I used their logic for this script, wondering if it works from them.
Not sure what else might be different between here and there that makes it work for me but not for you
from youtube-downloader.
I test again with Firefox and Opera latest version and not working, not to my site not from yours.Then i tested with Samsung Galaxy S Advanced with my netwotk conenction and still not working, again blank page (dead links). Btw i don't know python language.
from youtube-downloader.
One last thing to try - if you just go, in a completely fresh browser session (no cookies from youtube of any kind), to http://johneckman.com/yt/ or to http://inbuzunar.mobi/youtube/ and put in the ID again (IqEyLPCmQps), do you get a set of working links?
Just passing along the link that contains the ID and type=download doesn't work because that seems to be retrieving outdated data - but opening the index.php in a new session and refetching the flavors does work for me.
At this point I'm not sure how to support you further - all I know at this point is it works repeatedly for me in a fresh clean browser using the script as installed at my site with the same video ID you provided.
When I have more time I can investigate the difference between the URL that works for me (from my site) and the one that doesn't work for you (from your site) and see what different variables are being passed - maybe has to do with time zones? The google data sends back a key token that has an expiration time in it
from youtube-downloader.
If you look at the query string for one of the downloadable video types on your server you will see that in the querystring is an IP address:
The ip in this ur is 176.223.66.3 which nslookup tells me is: core3.spatiul.ro - yet the script itself is on a different server, 176.223.66.54.
I'm not sure what that IP is meant by google to represent, but I know that in queries on my own server I get this:
Where the IP appears to be an IPv6 address instead of IPv4: 2600:3c03::f03c:91ff:fe70:f2c0 but seems to resolve to linode, where my copy of the script is hosted.
So, for one reason or another, the url that Google returns for retrieving the video does include an IP address from which the original call came which generated the signature.
Not sure what bits in the querystring are meaningful but obviously somehow the signature big and expires bit are not matching for you - the "expires" seems to be a unix timestamp, as does "mt" (when the info about the primary video was first retrieved?).
Somehow google is "sensing" that the browser requesting the video data is not the same one that originally requested the video - but that's true in my case too, yet somehow it works for me.
from youtube-downloader.
Further comparing the two, the only things that vary between the querystring that works for me and the one that doesn't are the ip and ipbits (8 for ipv4, 48 for ipv6), then the MT and Expire values (which makes sense as they were retrieved at different times), then the &cp, &upn, &signature, and &fexp parts.
Unfortunately I've no idea what each of those does, and it is the validity of the signature within that expiration window that seems to be the issue - thought again I'm not sure what is expected to be in there.
I will let you know if I discover anything useful.
from youtube-downloader.
Hello
I found this lib to at least work somehow.. I see the links at this url: http://johneckman.com/yt/getvideo.php?videoid=IqEyLPCmQps&type=Download
But I get a whit screen from firefox too :(
In chrome, I get more verbose message:
Access to the webpage was denied
You are not authorized to access the webpage at http://r13---sn-p5q7yner.c.youtube.com/videoplayback?algorithm=throttle-.....
Any ideas what I can test else to find a problem?
from youtube-downloader.
@huglester thanks for the info. I think the issue has to do with one of two things:
- The request that the script sends to youtube to get the links, which depending on the server on which the script is running may include an IPv4 address or an IPv6 address.
- The timing of the request from the server on which the script is running and the browser where the request originates.
Basically the script requests data (server side) from YouTube, and that data includes a "signature" token with an expiration date - if the next request (which is the browser requesting the new link) doesn't match the signature (as a result of the first issue above, the IP address not matching, which it seems to not check if it is IPv6, or as a result of the second issue, due to timezone differences) the error appears.
I'm going to make a debug option to show more data and dig into a bit - it will be helpful once I've done so to have some folks try it from other time zones and/or have it installed on multiple different servers to test.
from youtube-downloader.
I am currebtly not by the pc.. the error or the white screen took around 1
second.. so it is not a timeout. I could probably try virtuwl machine to
check with your timezone to see if it is a timezone issue.
What timezone do you use?
On Mar 23, 2013 7:57 PM, "John Eckman" [email protected] wrote:
@huglester https://github.com/huglester thanks for the info. I think
the issue has to do with one of two things:
The request that the script sends to youtube to get the links, which
depending on the server on which the script is running may include an IPv4
address or an IPv6 address.
2.The timing of the request from the server on which the script is
running and the browser where the request originates.Basically the script requests data (server side) from YouTube, and that
data includes a "signature" token with an expiration date - if the next
request (which is the browser requesting the new link) doesn't match the
signature (as a result of the first issue above, the IP address not
matching, which it seems to not check if it is IPv6, or as a result of the
second issue, due to timezone differences) the error appears.I'm going to make a debug option to show more data and dig into a bit - it
will be helpful once I've done so to have some folks try it from other time
zones and/or have it installed on multiple different servers to test.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-15341481
.
from youtube-downloader.
@huglester - can you try again? I added some debug info (there is now a "debug info" checkbox on the form, or just add "&debug=on" to the query string.
I think there are potentially a number of different things going on here. YouTube seems to expect/require that the machine on which the format string decoding occurs (where the script runs) have the same IP as the browser which will ultimately request the files. However, I know that isn't always the case, because I use a podcast downloader on my iPad which downloads using these links successfully - so for at least one use case (my actual primary use!) this restriction is not in place.
I also noticed that the get_video_info url that I am calling to get the format stream links previously included a value that suggests it was looking for a region of US - so it may be that IPs outside the US were getting denied. (I've removed that parameter now).
Finally, it seems like when it runs on my server (johneckman.com/yt/) what cURL passes to youtube is an IPv6 address (40 bits) not an IPv4 address (8bits). Maybe this is why it works on my server and not on others? The debug info will show you if yours is passing IPv4 or IPv6.
So, I'm thinking that one of these things is causing the isse:
- When the get_video_info file is called, if that call occurs over IPv6 but the later request for the data stream comes from IPv4, YouTube doesn't check for a match, and allows the download anyway. This would mean that folks running the script on servers which do IPv4 calls would fail, if their server IP doesn't match their client IP.
- When the get_video_info url is called, if the "gl=US" parameter is added, maybe YouTube then only allows streams from the US? (I was originally calling it with "&ps=default&eurl=&gl=US&hl=en" - removing all of those seems to have no effect.) This would mean that non-US users might have the script fail if their server was outside the US or their browsing was.
- Maybe the client that is actually downloading the video has to have an active youtube cookie of some kind? I don't think this is true because my podcast downloader successfully uses these links to download video podcasts but it has never visited youtube directly. I tried adding in the video thumbnail on the results page just in case that might trigger the appropriate cookie in the user's browser.
- Maybe the "signature" that YouTube provides for each file is expiring. Added debug info which shows the "expires" value YouTube provided, translated into a date/time via PHP. Note this shows the expiration time in the timezone of the server (EDT in my case) - if your server is in a different timezone than your browser, you will need to see if they match.
from youtube-downloader.
Hello jeckman;
I tried it.
It's working fine on localhost,but it's not working on server.
Ip based protection doesn't allow to download.It's gives error :
Access Denied
You are not authorized to access the webpage at
http://r6---sn-p5qlsn7e.c.youtube.com/videoplayback?ipbits=48&upn=1vD96Czmh14&expire=1364558804&mt=1364535617&fexp=932000,906383,902000,919512,929903,931202,900821,900823,931203,931401,908529,919373,930803,906836,920201,929602,930101,930603,900824,910223&ms=au&source=youtube&itag=34&key=yt1&mv=m&burst=40&sparams=algorithm,burst,cp,factor,id,ip,ipbits,itag,source,upn,expire&ip=2600:3c03::f03c:91ff:fe70:f2c0&newshard=yes&factor=1.25&sver=3&id=170f8133e32a81e8&cp=U0hVSVVQVl9FTkNONV9NSlpJOnhhZ2t5TmdFbFJ3&algorithm=throttle-factor&signature=1C3FA57530B4FCDF0F2409661BDBFB1B30CA237D.366A33E6DE3AE9BDAA527D09ABD003CEF2586C52
You may need to log on.
Regards.
from youtube-downloader.
@sever2k13 - what was shown on the page listing the videos? Did you try it with the "debug info" checked?
It looks from the url you provided like your server was using IPv6, so that wouldn't be the issue - how about the "expires" value? On the download links page when you run the script if you check "show debug info" it should tell you when it thinks the links will expire.
Are you (your browser and/or server) outside the US? Are you and your server in the same time zone?
from youtube-downloader.
@sever2k13 Interestingly, that link in your comment did just work for me, in Chrome (where I might have youtube cookies or be logged in already) and in Opera (no cookies, no login, no previous youtube visit).
Still not sure why it is working for me and not others.
from youtube-downloader.
same for me. It includes the IP of the server in the URL as opposed to the client. When you look at ssyoutube.com, the link includes the IP of the client.
from youtube-downloader.
When I use my VPN to USA it works fine.
from youtube-downloader.
@iamzug Thanks for following up. So what I'm taking away from the discussion is that if you have both IPV6 on the server (so that the IP isn't matched) AND a US IP address, then it works.
Or is that you need IPv6 and you need an IP address (client) in the same region as the ip address of the server?
from youtube-downloader.
People for whom the script is not working might want to check out this project, which uses JavaScript to do the parsing on the client side, removing the IP issues:
https://github.com/edse/keepvideos
from youtube-downloader.
When you said "
I also noticed that the get_video_info url that I am calling to get the format stream links previously included a value that suggests it was looking for a region of US - so it may be that IPs outside the US were getting denied. (I've removed that parameter now)." Is there a way I can request another region specifically?
from youtube-downloader.
Hi, i insert following Code into the curl.php
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5_0 (Windows; U; Windows NT 6_1; de; rv:1_9_2_8) Gecko/20100722 Firefox/3_6_8" );
curl_setopt( $ch, CURLOPT_COOKIEJAR, "/dev/null" );
and save the video onto my server :-)
$video = curlGet($redirect_url);
$fp = fopen('test.mp4', 'w');
fwrite($fp, $video);
fclose($fp);
Good Luck :-)
from youtube-downloader.
Hi, am able to download the videos in localhost, but am not able to download in my server. when i open the download link it says Access to the webpage was denied. URL: http://demo.pradeep-designer.com/youtube/getvideo.php?videoid=1A7lVzHttRY&debug=on&type=Download. Even "https://github.com/edse/keepvideos" works in localhost not in server. any help?
from youtube-downloader.
Did you try my changes?
from youtube-downloader.
yes i have copied all your code and added to curl.php Please let me know i have to do anything specific
from youtube-downloader.
mhhh... do you try manuel saving with my code above?
I don't test the example with my changes... i just make changes to curl.php and save it manuellly with these 4 lines of code....
from youtube-downloader.
i have added all your 8 line of code in curl.php is that correct or i have to add it some other page. Manual save as is not working
from youtube-downloader.
No thats wrong ... you have to add the 4 Lines
curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
curl_setopt( $ch, CURLOPT_USERAGENT, "Mozilla/5_0 (Windows; U; Windows NT 6_1; de; rv:1_9_2_8) Gecko/20100722 Firefox/3_6_8" );
curl_setopt( $ch, CURLOPT_COOKIEJAR, "/dev/null" );
in the curl.php ... insert after line 12!
then you can test with single file
$video = curlGet($redirect_url);
$fp = fopen('test.mp4', 'w');
fwrite($fp, $video);
fclose($fp);
$redirect_url is the Link you want to download!
In your Example :
from youtube-downloader.
Hi still same result
i have added your 4 line code after the below code
curl_setopt( $ch , CURLOPT_RETURNTRANSFER , 1 );
and i have created a new page download.php with other set of code
http://demo.pradeep-designer.com/youtube/download.php (please view source to see the code)
from youtube-downloader.
Thanks to a pull request from sepehr there's now a simple proxy download option, which uses php readfile() to get the file from the remote url on the server and pass through to the browser. This should help folks whose servers have ipv4.
Your server still needs to be able to use fopen with url wrappers - some hosts disallow this
from youtube-downloader.
Is there any solution for this??
from youtube-downloader.
Related Issues (20)
- save links HOT 1
- Convert and Download to .mp3 not working HOT 2
- is blocked by google Cross-Origin Read Blocking (CORB)
- No longer working HOT 6
- This youtube downloader is as good as dead HOT 1
- main channel thumbnail not displaying HOT 3
- Is the signature dechipher function recently changed?
- No format stream map found - was the video id correct? HOT 1
- Video IDs containing an underscore are not supported HOT 1
- Error in video ID: HTTP is not supported. HOT 10
- HTTP ERROR 500
- SSL Certificate problem
- Uncaught exception 'Exception' with message '<url> malformed' HOT 1
- Youtu.be url is not working
- CurlClient.php:203 Stack trace: #0 line 308 HOT 2
- How to change Youtube API key?
- this script is unable to download some of the youtube videos HOT 1
- Hi my problem first run url HOT 1
- OpenSSL Error messages: error:14095126 unexpected eof while reading HOT 1
- Problem while downloading youtube videos HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-downloader.