python利用requests获取网页源码
2018-12-20 本文已影响33人
潇洒的夏夏
--coding:utf-8 --
开发者:潇洒的夏夏
QQ:1075625244
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf8')
url='http://jianshu.com'
req=requests.get(url)
print(req.text)
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf8')
url='http://jianshu.com'
req=requests.get(url)
print(req.text)