출처: https://docs.python-requests.org/en/latest/
import requests
r = requests.get('URL')
requests.get(args..) -> class requests.Response object
S/F | return |
---|---|
성공 | class requests.Response 오브젝트 |
실패 | - |
class requests.Response
object, contains a server's response to an HTTP request.import requests
r = requests.get('URL')
requests.get(args..) -> class requests.Response object
import requests
r = requests.get('URL')
r.close()
raw
object. Must not be accessed againresponse.encoding = None
, encoding will be guessed using charset_normalizer
or chardet
response(object).encoding
appropriately before accessing this property.import requests
r = requests.get('URL')
print(r.text)
# URL의 response를 unicode로 담고 있음 이를 출력
import requests
r=requests.get('URL')
import requests
r = requests.get('URL')
r.encoding='utf-8'
print(r.text)