chrome xpath 插件调试,提取-Python 技术分享 Java技术分享 Python 爬虫技术_微信公众号:zeropython—昊天博客

 

相信玩过爬虫的都知道一些库,如lxml(python),可以使用xpath方便地对HTML进行提取,但当真正用的时候,问题就来了,想找到一个元素往往要调试好几遍,而且得先code,下面提供了几个工具及如何用chrome进行xpath test

1.chrome xpath helper

chrome xpath插件下载 :https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl

 

2.chrome xpathFinder – xpath查找助手

chrome xpath插件下载 https://chrome.google.com/webstore/detail/xpath-finder/ijaobnmmgonppmablhldddpfmgpklbfh/related

3.chrome console xpath

F12->$x("//title")

[<title>Online Tools for Software Developers (Free)</title>]




HTTPX 基础教程-新乡seo|网站优化,网站建设_微信公众号:zeropython—昊天博客