python requests get获取网页
import requests
#获取url地址
url = "https://www.baidu.com"
#获取页面源代码
respones = requests.get(url)
respones.encoding = "utf-8"
# print(respones.text)
#将获取的页面存储
with open("baidu.html",mode="w",encoding="utf-8") as f:
f.write(respones.text)
print("get over!")