XPath Helper-爬虫网页解析工具

annayy 开发者工具339阅读模式

XPath Helper 插件概述

xpath helper chrome插件(爬虫网页解析工具)是一款非常受开发 人员欢迎的浏览器插件,适用于谷歌浏览器,这款插件能够快速精准地对xpath路径定位、进行获取,为写爬虫、从事网页分析的朋友提供极大的方便。有需要的朋友欢迎来Chrome扩展网下载使用!

XPath Helper 插件开发背景

每一个写爬虫、或者是做网页分析的人,相信都会因为在定位、获取xpath路径 上花费大量的时间,甚至有时候当爬虫框架成熟之后,基本上主要的时间都花费在了页面的解析上。在没有这些辅助工具的日子里,我们只能通过搜索htm|源代码,定位一些id去找到对应的位置,非常的麻烦,而且经常出错。

XPath Helper 插件介绍

一款免费的chrome爬虫网页解析工具。可以帮助用户解决在获取xpath路径时无法正常定位等问题。该插件主要能帮助你在各类网站上通过按shift键选择想要查看的页面元素来提取查询其代码,同时你还能对查询出来的代码进行编辑,而编辑出的结果将立即显示在旁边的结果框

XPath Helper-爬虫网页解析工具

XPath Helper 插件使用方法

打开窗口后,按shift键并移动鼠标至你需要查看的区域即可立即在插件窗口中显示其代码查询结果。
1)打开-个新的标签,并导航到你最喜欢的网页。
2)按Cctrl-shift键 x以打开xpath辅助控制台。
3)按住shift键鼠标在页面上的元素。查询框会不断更新,以显示鼠标指针下面的元素充分xpath查询。结果框其右侧将显示评价结果的查询。
4)如果需要的话,可以直接在控制台编辑xpath查询。在结果框中将立即反映任何变化。
5)再次按ctrl-shift键 x关闭控制台

XPath Helper 插件注意事项

虽然插件使用非常方便,但它也不是万能的,有两个问题:

1插件自动提取的xpath都是从根路径开始的,这几乎必然导致xpath过长,不利于维护;

2.当提取循环的列表数据时,本插件是使用的下标来分别提取的列表中的每条数据, 这样并不适合程序批量处理,还是需要人为修改一些类似于标记等。不过,合理的使用xpath,还是能帮我们省下很多时间的!

XPath Helper 插件描述:

应用大小:247 KiB
版本:v 2.0.2
用户量:200000
下载次数:4058
更新时间:2021-12-21

XPath Helper 插件下载:

关注“Chrome扩展网”公众号,输入“插件”根据提示,即可下载最新安装文件。

XPath Helper 插件安装流程:

(1)将下载的安装包文件(.zip)解压为文件夹,其中类型为“crx”的文件就是接下来需要用到的安装文件
(2) 从设置->更多工具->扩展程序 打开扩展程序页面,或者地址栏输入 Chrome://extensions/ 按下回车打开扩展程序页面
(3) 打开扩展程序页面的“开发者模式”
(4) 将crx文件拖拽到扩展程序页面,完成安装

XPath Helper 插件原文介绍

XPath Helper makes it easy to extract, edit, and evaluate XPath queries on any webpage.

IMPORTANT: After installing this extension, you must reload any existing tabs or restart Chrome for the extension to work.

Instructions:
1. Open a new tab and navigate to any webpage.
2. Hit Ctrl-Shift-X (or Command-Shift-X on OS X), or click the XPath Helper button in the toolbar, to open the XPath Helper console.
3. Hold down Shift as you mouse over elements on the page. The query box will continuously update to show the XPath query for the element below the mouse pointer, and the results box will show the results for the current query.
4. If desired, edit the XPath query directly in the console. The results box will immediately reflect your changes.
5. Repeat step (2) to close the console.

If the console gets in your way, hold down Shift and then move your mouse over it; it will move to the opposite side of the page.

One word of caution: When rendering HTML tables, Chrome inserts artificial tags into the DOM, which will consequently show up in queries extracted by this extension.

本站文章均为原创,版权归本站所有,如需转载或引用请注明出处

weinxin
我的微信
“Chrome扩展网”微信公众号
微信扫码关注公众号,回复“验证码”获取插件
annayy
  • 本文由 发表于 2023年3月6日 16:39:28
  • 转载请务必保留本文链接:https://www.chromekz.com/devetool/2109.html
  • XPath Helper
  • XPath Helper 插件
  • 爬虫网页解析工具