HTTP Error 404: Not Found When Using Wget To Download A Link
This is the code being used: import wget firefox_29 = 'https://ftp.mozilla.org/pub/firefox/releases/29.0.1/win32/en- US/Firefox%20Setup%2029.0.1.exe' firefox_dir = 'C:\\firefox\\
Solution 1:
I also faced the same problem before some minutes, so found this question.
I first installed wget
with
pip install wget
then I faced this problem... After digging a little, I uninstalled it, with...
pip uninstall wget
And then used...
pip install python3-wget
The problem was solved.
Solution 2:
I managed to figure it out without using wget. Apparently wget is just a wrapper for urllib. So I used urlretrieve instead. Heres the code:
import urllib.request
firefox_29 = "https://ftp.mozilla.org/pub/firefox/releases/29.0.1/win32/en-
US/Firefox%20Setup%2029.0.1.exe"
urllib.request.urlretrieve(firefox_29, 'firefox29.exe')
However this just renames the .exe to "firefox29.exe", so if you need it downloaded to a specific location you just have to move it yourself.
Post a Comment for "HTTP Error 404: Not Found When Using Wget To Download A Link"