-
Notifications
You must be signed in to change notification settings - Fork 315
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
HTTP Error 403: Forbidden while downloading video #192
Comments
Have the same issue, trying to figure it out, but have no results yet, if you solve it please share your solution, thanks. |
I'm getting the same problem with Youtube's URL through the API. The download URL is supposedly blocked if accessed by an IP address different from the one that requested it. Have you tried seeing if a proxy solves the problem? I'm stuck here because I am not turning my website into a proxy. And using methods like get_file_content() receive a 403 error too, despite having the same IP. |
@JKDos unfortunately proxy didn't help( |
I had a feeling it wouldn't. Since others claimed it to only be downloaded from the same IP address, I did try having my server grab the file instead of the client. All methods return the 403 error back to the server. I also installed XAMPP and hosted everything from my own computer and got same problem. I think the method used here is out of date. I'm unfortunately giving up as it's taking too much work to get a working PHP downloader running on my site. There is an alternative method. You can look into using: https://github.com/thelevicole/youtube-to-html5-loader and this https://github.com/thelevicole/youtube-to-html5-server EDIT: I forgot to mention. Youtube is forever changing things on their backend likely to combat those of us downloading videos. If you finding a working solution, keep it mind it may be broken as soon as tomorrow. The python project for youtube-dl will probably be the best bet for finding a project that is well maintained. |
@JKDos well, it's hard to believe, but there are a few changes which is totally broke the download, I'm using it for more than 3 years and there are only twice when I needed to update it (this is a third :) ) and some people have a downloaders integrated in their projects, so using another langs projects can't be a solution but thanks for you thoughts. Btw the solution is found, wait some time when I post it. |
Take it! Just change
to
and userAgent to
It's fixed a 403 error and together with that didn't cut the speed as a bonus but some videos (not more than 5%) can't find the download links. I can give a glue that problem is in links decoder because all becomes working again without it because |
Thanks. That got it working. Still though, it has the other problem of missing audio on 1080p+ videos. At least with the sample video I am using. I've seen examples of solving this with FFMPEG. How to implement that in a PHP solution, is another topic. |
Glad to hear it!) Well, 1080+ videos are concidered as premium by YouTube so can even contains differ languages tracks, so you need to download a video and desired language audio separately (change
Don't worry it have the same extension. |
Thanks alot it worked. |
This is working well. Thank you so much @acuna-public. |
@kolipavan011 glad! Btw funny avatar!) |
so mine arent even downloading? i click fetch and it does nothing? also im trying to get public/video_info.php?url=https://www.youtube.com/shorts/Kn05M-hYAH8 to shoot back a direct .mp4 link |
Can you try to encode that youtube url? public/video_info.php?url=[encoded URL] |
@DennAgain YouTube reels direct links can be differ |
just shoots this back { |
ANDROID_TESTSUITE is not working anymore, i guess |
I see that :(. I've done some testing this morning. Try the following
|
All is working guys, I've tested it yesterday. As I mentioned earlier SOME of links CAN be unavailable, but it's about 5% of all. |
I don't think it's a 5% issue, at least not for me. No link I use with ANDROID_TESTSUITE (old or new) provides any video links links anymore. It's only returning meta data and thumbnails. Here's an example of what's being returned https://pastebin.com/3QvjUGTT That is a sample video I use for testing. It worked when I first switched to ANDROID_TESTSUITE, and currently works for the client data I shared today. |
ANDROID_TESTSUITE is not working anymore , ANDROID_CREATOR is working fine . i have switched to ANDROID_CREATOR few hours ago . |
@JKDos So it's working? https://www.youtube.com/watch?v=1mO3lW-FvuI It's working for me too. Can you share links which are not working for you? |
Hello, |
Sorry for any confusion. No link, including that one, is working for
The returned data includes only thumbnails and video meta data (e.g. name, description, creator, tags, etc). Interestingly, I see this in the returned data
While looking for an alternative today, I did have success with everything I tried so far with the following.
Perhaps there's another piece to the the puzzle outside the clientName and clientVersion to make |
sign Youtube figtht hardly |
@JKDos so did |
@cyberpunkbln not quite like that because I know only twice (last one is the third) where it brokes downloading for its entire history. |
I've used it on a few videos so far, and it seemed to be functioning in the same manner that To be honest though, I try not to use my php downloader because the downloads are extremely slow, and larger videos will sometimes fail before finishing. I've setup youtube-dl on a raspberry pi and I'm trying to utilize that more often. That Javascript alternative might still be worth looking into, if anyone is still interested: https://github.com/thelevicole/youtube-to-html5-loader |
Will composer update get us the latest fixes? |
ANDROID_CREATOR not working: https://www.youtube.com/watch?v=XXYlFuWEuKI |
Yes, unfortunately, now it's constantly returning I found an alternative that's working. I'm thinking the dunderheads at Youtube are reading this thread, so I might have to DM it to you |
yes please mail me [email protected] |
Hi guys, whats up? Found a solution, please wait some days while I've upload it, I need some tests. |
@acuna-public did you end up testing your solution? I'm also in need; to be honest, I use this tool to reverse proxy my own youtube videos in a setting where youtube.com is blocked (educational) |
@poor-bob ah, I'm so sorry, I was busy this days so forgot to wrote here. I wanted to contact @JKDos about his solution firstly because my based on another client name so I need to know which his solution is based so can you please wait about 2-3 days while we communicated and after that I'll post it there? |
@JKDos hi, I've already found a solution about a month ago, can I ask you about on what is yours based? What is DM you're talking about? Or you can write me at [email protected] |
DM as in Direct Message. My PHP downloader might be a combination of 2-3 PHP projects I smashed together to get working as most solutions were outdated by the time I got to them. As far as I know, the last solution I found for this is still up and running. It may not be what you want to hear, but I have since abandoned doing this via webserver / PHP. I am now using yt-dlp on one of my Linux servers. It's lightning fast and maintained. Plus, it will automatically merge video and audio for me. https://github.com/yt-dlp/yt-dlp/wiki/Installation Install Example (Debian/Ubuntu):
|
@JKDos yes, I know that DM means but I didn't know that GitHub have it) Okay, thanks but for it, but it's not a solution for me because my project on PHP. My solution stops working some days ago so I'm looking for another one. I'm freer now so I can spend my time on it. @poor-bob I can be so busy sometimes because of main job so don't hesitate to write me in a week for example if I disappeared suddenly again. |
@acuna-public thank you! But I'm actually not in need of help with this anymore. I've abandoned it. And funnily enough, @JKDos my team looked into alternatives as well and we went with yt-dlp. |
it's working great for us; we implemented the change in less than 4 hours total. from what we could tell, they were doing quite a lot different at |
How can I solve this issue?
The package working well but whenever I am downloading video from received url, 403 error is getting
The text was updated successfully, but these errors were encountered: