Python Forum
error HTTP Error 403: Forbidden - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: error HTTP Error 403: Forbidden (/thread-30937.html)



error HTTP Error 403: Forbidden - local_bit - Nov-14-2020

I am using API for a long time on https://localbitcoins.net/
Since November 13th, when using the urllib library for Python, an error appeared
I'm from Belarus

Error:
url='https://localbitcoins.net/sell-bitcoins-online/BYN/.json' orders = urllib.request.urlopen(url) File “D:\Program Files\python\lib\urllib\request.py”, line 222, in urlopen return opener.open(url, data, timeout) File “D:\Program Files\python\lib\urllib\request.py”, line 531, in open response = meth(req, response) File “D:\Program Files\python\lib\urllib\request.py”, line 641, in http_response ‘http’, request, response, code, msg, hdrs) File “D:\Program Files\python\lib\urllib\request.py”, line 569, in error return self._call_chain(*args) File “D:\Program Files\python\lib\urllib\request.py”, line 503, in _call_chain result = func(*args) File “D:\Program Files\python\lib\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
Windows 10 64
Python 3.7.3
pip list
Package Version
———— ——–
asyncio 3.4.3
certifi 2019.3.9
chardet 3.0.4
eth-hash 0.2.0
eth-typing 2.1.0
idna 2.8
lbcapi3 1.0.0
pip 19.1.1
pycryptodome 3.8.2
requests 2.22.0
setuptools 40.8.0
toolz 0.9.0
urllib3 1.25.3


RE: error HTTP Error 403: Forbidden - ndc85430 - Nov-14-2020

Look at the response body to see if there's any further information. Also, if the API has documentation, you might like to check that to see under what circumstances it returns 403.