Tags
python
Asked 2 years ago
11 Aug 2021
Views 491
Heloise

Heloise posted

python parse http response (string)

python parse http response (string)
Phpworker

Phpworker
answered Aug 17 '21 00:00

requests.models.Response.text give you text / String .


import requests
response=requeste.get("http://www.java.com")
print(response.text)


or use (str( response.content )) give you text / String .
response.content give you byte need to cast to string by str() method
Post Answer