用户:
奥特侨查看:1 回复:2 评论:1 创建时间:2022-08-24T19:09:54
【作品展示】

【作品介绍】
无
【作品源代码】
import requests
import webbrowser
import os
url = 'https://shequ.codemao.cn'
response = requests.get(url)# 指定编码
response.encoding = "utf-8"
content = response.text
print(content)
with open("codemao.html","w",encoding = "utf-8") as f:
f.write(content)
webbrowser.open("file://"+os.path.realpath("codemao.html"))
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn