Mar-08-2018, 11:36 AM
If it's a HTTP response could use Requests to parse it.
Data after
Data after
Content-Type: text/plain
can get with .text
or .contend
.>>> import requests >>> r = requests.get('http://httpbin.org/') >>> r.status_code 200 >>> r.headers['content-type'] 'text/html; charset=utf-8' >>> print(r.text[:95]) <!DOCTYPE html> <html> <head> <meta http-equiv='content-type' value='text/html;charset=utf8'>