김학진
@mildsalmon
흔치않고, 진귀하다.
2020년 02월 15일 · 35분 분량
간단한 Requests 예시 r = requests.get('https://api.github.com/user', auth=('user', 'pass')) print(r.status_code) print(r.headers['content-type']) print(r.encoding) print(r.text) print(r.json()) # 403 # application/json; charset=utf-8 # utf-8 # {"message":"Maximum number of login attempts exceeded. Please try again later.","documentation_url":"https://developer.github.com/v3"} # {'message': 'Maximum number of login attempts exceeded. Please try again later.', 'documentation_url': 'https://developer.github.com/v3'} r.status_code 는 .get 부분에 auth=에 …