一往无前001
2019-02-27 00:12
F:\python\python.exe F:/pycharm/new/ne.py
Traceback (most recent call last):
File "F:/pycharm/new/ne.py", line 16, in <module>
resp = urlopen(req, data=postData.encode('utf-8'))
File "F:\python\lib\urllib\request.py", line 162, in urlopen
return opener.open(url, data, timeout)
File "F:\python\lib\urllib\request.py", line 471, in open
response = meth(req, response)
File "F:\python\lib\urllib\request.py", line 581, in http_response
'http', request, response, code, msg, hdrs)
File "F:\python\lib\urllib\request.py", line 509, in error
return self._call_chain(*args)
File "F:\python\lib\urllib\request.py", line 443, in _call_chain
result = func(*args)
File "F:\python\lib\urllib\request.py", line 589, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
Process finished with exit code 1
如图所示
你代码的postData中的key value和这个图里的要一模一样,貌似你写的不一致
python遇见数据采集
59669 学习 · 200 问题
相似问题