Httpe error 404 pytube problem

hello guys, i have a problem in python code, i try to do a youtube downloader but i have a problem

Traceback (most recent call last):

File “C:/Users/hosam/PycharmProjects/instabotf1/venv/instabotf1.py”, line 8, in
video = YouTube(link)
File “C:\Users\hosam\PycharmProjects\instabotf1\venv\lib\site-packages\pytube_main_.py”, line 91, in init
self.prefetch()
File “C:\Users\hosam\PycharmProjects\instabotf1\venv\lib\site-packages\pytube_main_.py”, line 181, in prefetch
self.vid_info_raw = request.get(self.vid_info_url)
File “C:\Users\hosam\PycharmProjects\instabotf1\venv\lib\site-packages\pytube\request.py”, line 36, in get
return _execute_request(url).read().decode(“utf-8”)
File “C:\Users\hosam\PycharmProjects\instabotf1\venv\lib\site-packages\pytube\request.py”, line 24, in _execute_request
return urlopen(request) # nosec
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 222, in urlopen
return opener.open(url, data, timeout)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 531, in open
response = meth(req, response)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 640, in http_response
response = self.parent.error(
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 563, in error
result = self._call_chain(*args)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 502, in _call_chain
result = func(*args)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 531, in open
response = meth(req, response)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 640, in http_response
response = self.parent.error(
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 569, in error
return self._call_chain(*args)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 502, in _call_chain
result = func(*args)
File “C:\Users\hosam\AppData\Local\Programs\Python\Python38\lib\urllib\request.py”, line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
===========================

  • i know that my file name is instabotf1 but I’m too lazy to change it :slight_smile:

Hey @harbi - Hard to say what the issue is. Could you share some code and instructions on how to reproduce the issue? See How to Get your Questions Answered on the Plotly Forum

The typical trigger for an error 404 message is when website content has been removed or moved to another URL. There are also other reasons why an error message could appear. These include: The URL or its content (such as files or images) was either deleted or moved (without adjusting any internal links accordingly)
Regards,
Rachel Gomez