只需一步,快速开始
720
940
3116
管理员
from urllib import request url = "https://XXXXXXXXX" #网页地址 wp = request.urlopen(url) #打开连接 content = wp.read() #获取页面内容 fp = open("test.html","w+b") #打开一个文本文件 fp.write(content) #写入数据 fp.close() #关闭文件
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
|Archiver|手机版|小黑屋|21番茄网 ( 粤ICP备10099428号 ) 奇远富
GMT+8, 2025-2-22 17:02 , Processed in 0.131457 second(s), 34 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.