Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我认为在 python 中使用 lxml 库可以提供帮助,但无法找出如何做到这一点?
一个简单的起点...
import lxml.html page = lxml.html.parse('http://www.google.com').getroot() print page.xpath('//a/@href')