1 import requests 2 html = requests .get (‘http://ttlike.top‘) 3 html_bytes = html.content 4 html_str = html_bytes.decode() 5 print (html_str)
<Response [200]>
1 import requests 2 html = requests .get (‘http://exercise.kingname.info/exercise_requests_get.html‘).content .decode() 3 print (html)
原文:https://www.cnblogs.com/hxlinux/p/12853020.html