Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error HTTP Error 403: Forbidden
#1
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
buran write Nov-14-2020, 07:56 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  HTTP 404 error with Session Pool Clives 0 243 Jun-17-2021, 06:45 PM
Last Post: Clives
  403 Forbidden Error Evil_Patrick 1 1,082 Jun-20-2020, 02:19 PM
Last Post: snippsat
  urllib.error.HTTPError: HTTP Error 404: Not Found ckkkkk 4 4,283 Mar-03-2020, 11:30 AM
Last Post: snippsat
  python beginner HTTP Error 500 leofcastro 0 783 Jan-24-2020, 04:37 PM
Last Post: leofcastro
  HTTP error 404 Karin 4 2,716 May-31-2019, 02:23 PM
Last Post: snippsat
  How to check HTTP error 500 and bypass SriMekala 3 2,265 May-04-2019, 02:07 PM
Last Post: snippsat
  Syntax error for HTTP request GET THX1138 1 4,505 May-12-2018, 12:02 PM
Last Post: snippsat
  HTTPError: Forbidden when try download image b33g33 8 15,302 Jan-21-2017, 12:42 PM
Last Post: scriptso

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020