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.
我正在编写一个爬虫,并且我不断遇到表单控件,对于这些控件,机械化无法为我提供除类型之外的任何信息。有什么方法可以获得与控件关联的人类可读文本?我知道这是一个有点模糊的领域,因为没有完美的方式来获取这些信息,但也许有什么可以帮助的?
在兄弟节点和父节点的文本上查找文本,因为那是它们经常出现的地方。如果您确实必须解析 html,LXML 可能会有所帮助。