Answer the question
In order to leave comments, you need to log in
Urllib.error.HTTPError: HTTP Error 403: Forbidden on server, how to get around?
Everything works on the laptop, but there is an error on the server, I tried to update the libraries, put through freeze all the same as on the laptop, it did not help.
It could be a problem with the user agent. I use mozilla 5.0
Who had it - advise how to get around the problem.
(both python version 3.8.2)
Traceback (most recent call last):
File "genfunc.py", line 81, in <module>
print(generate_music_list('Rammstein'))
File "genfunc.py", line 74, in generate_music_list
func_music = dw_music_link(func_artist_public[i])
File "genfunc.py", line 29, in dw_music_link
urlPage = urlopen(pageurl)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib/python3.8/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
Answer the question
In order to leave comments, you need to log in
If it works on your system, then apparently the server ip has been banned for being too annoying. Find a working proxy server with address replacement and try to request through it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question