Reputation: 33
I used this code to download a Youtube video before 2 weeks and it worked but now when i try to run it i am getting this :
raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
how to fix it ?
from pytube import YouTube
link=input("Enter the URL link : ")
video=YouTube(link)
video.streams.get_highest_resolution().download(output_path=r'D:\YouTubevideos')
print("Download done")
from pytube import Playlist
playlist_link=input("Enter the play list link : ")
playlist=Playlist(playlist_link)
for videos in playlist.videos:
videos.streams.get_highest_resolution().download(output_path='D:\YouTubevideos')
Upvotes: 0
Views: 451
Reputation: 1
There is no fix for it, this is a problem with the package itself. Please wait for an update or use another youtube package for now like pypi or youtube_dl
Upvotes: 0
Reputation: 658
Upgrade your pytube package and it should be fixed. The current version is 10.8.5
pip install pytube --upgrade
Upvotes: 2