2021年11月30日

抓取url中图片并保存到本地demo

摘要: import requests from lxml import etree from furl import furl url = 'https://dsd.com' html = requests.get(url).text #re.findall('"objURL":"(.*?)",',htm 阅读全文

posted @ 2021-11-30 14:46 iUpoint 阅读(109) 评论(0) 推荐(0) 编辑

使用 lxml 中的 xpath 高效提取文本与标签属性值

摘要: 转自:使用 lxml 中的 xpath 高效提取文本与标签属性值 # 我们爬取网页的目的,无非是先定位到DOM树的节点,然后取其文本或属性值 myPage = '''<html> <title>TITLE</title> <body> <h1>我的博客</h1> <div>我的文章</div> <d 阅读全文

posted @ 2021-11-30 12:54 iUpoint 阅读(795) 评论(0) 推荐(0) 编辑

导航