from requests import request resp = request(‘get‘, ‘http://www.baidu.com‘) print resp.content
Python爬虫遇到IOError或连接失败等将headers补充全尝试
Python爬虫
原文:http://www.cnblogs.com/cmm2016/p/6703179.html