requests 只获取 url headers

import requests

r = requests.head('http://www.baidu.com')
print(r.headers)
print(r.__dict__)
print(r.__attrs__)