requests:最友好的网络爬虫功能库
requests:最友好的网络爬虫功能库import requests
r = requests.get('http://api.github.com/user', auth=('user', 'pass'))
r.status_code
r.headers['content-type']
r.encoding
r.text
url = "http://news.qq.com"
r = requests.get(url, timeout=30)
print(r.text)
页:
[1]