-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 404: Not Found when trying get stream #1060
Comments
Thank you for contributing to PyTube. Please remember to reference Contributing.md |
I'm getting this error too now, I've an up and running app that has errors with all videos. |
Same error happening for me as well |
@rishabh3354 actually this is expected since YouTube always block apis like these and make updates on them from time to time. |
So there must be a solution for this.. Actually it is quite irritating.. please suggest a solution. |
This error already happened in the past, basically youtube updated the URLs, so PyTube couldn't download the video, at the time the solution was a new Pytube update, at the moment I'm not having problems in my application with this error, maybe that's just it is happening to some people. |
I can't fix this tonight, I will try to work on it tomorrow |
If yesterday one of the 2-3 requests was a success, today all requests failed. |
Same here, yesterday happening with every second video, so I was bombing it in a loop till it worked out. Helped for few hours, but today I am unable to download a single video, not even from a different IP address. Grateful for this active community, authors and contributors! Hope we can find a workaround/fix. |
Yes now all requests is failing |
Failing for all of the videos now. |
Same happening here. |
Same error |
dito, failing all videos |
Same for me.. some solutions? |
https://github.com/ytdl-org/youtube-dl are able to do it by parsing the webpage. |
I saw same issue recently in it, are you sure about this can work? |
I just used it right now to download an entire playlist, and it worked (while pytube didn't). |
Pytube is using the |
Do we have an update on this, since this being an awesome library and with a critical issue like this one, I am having an impact on an already running app. Request to please kindly provide an update on this issue. Also, thanks for the awesome work you guys are doing! |
You can test Zeecka's experimental solution. Worked great for me: Had to change my code to explicit download mp4 format, otherwise it downloaded 3gp format: |
Update: I made a couple slight changes to Zeecka's solution that should help with the age restrictions. I believe the current version will now work correctly for most age-restricted videos without needing to authenticate. There are certain age-restricted videos that are even more restricted than others that will require authentication, but these videos are very uncommon. If you are able to, please install the experimental version, test it out, and let us know if there are any unexpected errors. If you run into an yt = YouTube(url, use_oauth=True) The first time that you run this code with the You can install the experimental fix to test it with |
I'm glad you had a solution for the error 🙌🙌, I just have a doubt that is: If in my code I don't put the use_oauth, and put it to download normally nothing will be stored on my machine right? |
That is correct. Nothing is stored on your machine if you don't include the |
|
i downloaded dash stream video and found extension is missing in the downloaded files. Previously extension (for eg .mp4 or.webm ) is automatically included in the downloaded videos. I dont know if its a bug or new feature but my project breaks with this. |
|
@LeopardsLeone ah sorry, my bad thought the traceback might provide some help incase it was different to any others |
@rishabh3354 This behavior changed in v10.9.3, and should only happen if you're using the
Yes, it will, but it needs to be tested more thoroughly before I push it there, hence why I'm asking for help testing. |
Just so you know, even if I did the initial PR, @tfdahlin was already aware of the workaround and worked on the biggest part of the fix (oauth / Age restriction bypass). Thank you for your work. |
Since my comment #1060 (comment) I downloaded a couple of more videos with the patch 1060 applied and all worked fine! However, I just noticed something else on this topic:
I use "try" and "except" when downloading streams. |
Thanks for the information. I am testing it thoroughly, if any bug comes up, will let you know. Thanks @tfdahlin |
Thank you @Zeecka as well! I saw all the work you and @tfdahlin put into the PR. You are inspiring me to start contributing to this project as well. |
git+https://github.com/Zeecka/pytube@fix_1060 this is working quite smoothly in my project. i havenot found any bugs till now. Merge it to main soon. Thanks, Fantastic work @tfdahlin, @Zeecka |
Zeecka's fix branch is working for me too. pip install git+https://github.com/Zeecka/pytube@fix_1060 Downloaded 150 videos no issues. It also seems faster to me. |
Hey guys, I'm getting HTTP 410 Gone but the video is definitely not gone. Maybe a bug?
To clarify, this is with |
It looks like the 404 has been changed to a 410. You're seeing this issue because you do not have the experimental branch correctly installed (In your traceback, I see references to |
@tfdahlin good catch, Ive got python and python3 issues on my computer. I don't know why I can't intsall it from Github. I'll just wait for you guys to merge with master. Any sense when that might happen? |
@must-defend-500 I'm hoping to get to it tomorrow. I need to fix a bunch of unit tests, and it's taking a while (most of the old ones relied on data generated by the old get_vid_info url, so now that objects are being created in a different way, its causing issues with our mock objects) |
One thing i notice, i am able to download age restricted video from pytube. And when i am trying to download same video from youtube-dl, it is giving me error. youtube-dl currently not handling age restricted videos. but pytube does. great job @tfdahlin |
I've been testing it a bit, and captions do not work with the experimental solution.
|
try |
* User InnerTube in place of `get_video_info` url * Added some additional base parameters for innertube requests. * Added Oauth support for innertube client * Add exception for age-restricted videos which can no longer be accessed without using auth. * Carved out and simplified code where possible due to API changes. * Added renderer catch -- fixes #1068 * Additional channel name support for URL-encoded names. * Updated test mocks, removed region-locked test because that functionality no longer works.
The fix for this has been pushed to pypi as v11.0.0, so you should be able to install it normally with |
@tfdahlin you rock, thank you for the lib and the fix. |
Describe the bug
I need to get URL to upload the video on AWS. The code is simplest as possible
The video that I want to download: http://youtube.com/watch?v=2lAe1cqCOXo
On the line where we get streams, it returns the error
urllib.error.HTTPError: HTTP Error 404: Not Found
It's happening not always around once at 2-3 requests.
Full error list:
System information
The text was updated successfully, but these errors were encountered: