HTTPError
을 던질 때 http
본문을 가져 오는 방법은 무엇입니까?python3이 HTTPError를 throw 할 때 HTTP 본문을 가져 오는 방법
Traceback (most recent call last):
File "C:\Users\RileyRen\Desktop\query_token.py", line 17, in <module>
File "D:\Environment\Python32\lib\urllib\request.py", line 495, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
파이썬은 HTTPError
가 발생합니다,하지만 난 HTTP 본문을 얻을 수 없습니다.
네 말이 맞아! –