当前位置:网站首页>将网页变成字符串,并保存起来
将网页变成字符串,并保存起来
2022-08-04 18:51:00 【狗庄欺人太甚】
def get_items(req):
"""使用Xpath解析页面,提取商品信息"""
if (type(req) == str):
html = etree.HTML(req)
else:
html = etree.HTML(req.text)
with open('/cloud/cloud_disk/users/huh/nlp/smart_home/script/super_Reptile/kk.txt','w') as fp:
fp.writelines(str(req.text))
边栏推荐
- Scala104-Spark.sql的内置日期时间函数
- MySQL安装教程(详细)
- The CPU suddenly soars and the system responds slowly, what is the cause?Is there any way to check?
- Understanding of margin collapse and coincidence
- #yyds干货盘点# 面试必刷TOP101:链表相加(二)
- 【简答题】月薪4k和月薪8k的区别就在这里
- Homework 8.3 Thread Synchronization Mutex Condition Variables
- 译文推荐|Apache Pulsar 隔离系列(四):单集群隔离策略
- 防火墙基础之防火墙做出口设备安全防护
- FE01_OneHot-Scala应用
猜你喜欢
通配符SSL证书不支持多域名吗?
Flink/Scala - Storing data with RedisSink
2018年南海区小学生程序设计竞赛详细答案
A group of friends asked for help, but the needs that were not solved in a week were solved in 3 minutes?
如何进行自动化测试?
Flask framework implementations registered encryption, a Flask enterprise class learning 】 【
DHCP&OSPF combined experimental demonstration (Huawei routing and switching equipment configuration)
ACP-Cloud Computing By Wakin自用笔记(1)云计算基础、虚拟化技术
开篇-开启全新的.NET现代应用开发体验
阿里云技术专家秦隆:云上如何进行混沌工程?
随机推荐
ECCV 2022 | FPN错位对齐,实现高效半监督目标检测(PseCo)
The Industrial Metaverse Brings Changes to Industry
Matlab drawing 1
2018年南海区小学生程序设计竞赛详细答案
自己经常使用的三种调试:Pycharm、Vscode、pdb调试
路由技术
powershell和cmd对比
【杰神说说】物联大师2.0版本预告
win10 uwp xaml 绑定接口
合宙Cat1 4G模块Air724UG配置RNDIS网卡或PPP拨号,通过RNDIS网卡使开发板上网(以RV1126/1109开发板为例)
ACP-Cloud Computing By Wakin自用笔记(2)CPU和内存虚拟化
网站设计师:Nicepage 4.15 Crack By Xacker
Those things about the curl command
C#爬虫之通过Selenium获取浏览器请求响应结果
服务器
win10 uwp DataContext
curl命令的那些事
火灾报警联网FC18中CAN光端机常见问题解答和使用指导
直播回顾|7 月 Pulsar 中文开发者与用户组会议
企业即时通讯软件有哪些功能?对企业有什么帮助?