📅  最后修改于: 2022-03-11 14:45:56.251000             🧑  作者: Mango
import requests
url = "https://www.google.com"
response = requests.head(url)
print(response.headers) # prints the entire header as a dictionary
print(response.headers["Content-Length"]) # prints a specific section of the dictionary