Crawler, web analysis and Analytic Assistant tool Xpath-helper

Source: Internet
Author: User

Every person who writes a crawler, or does a Web page analysis, believes that it will take a lot of time to locate, get the XPath path, and even sometimes when the crawler framework matures, basically the main time is spent on page parsing. In the absence of these aids, we can only search the HTML source code, locate some ID to find the corresponding location, very troublesome, and often error. Here is an XPath helper plugin for Chrome for everyone.

Download link First: xpath-helper

Once installed, we reopen the browser and press Ctrl+shift+x to bring up the Xpath-helper box. The interface is as follows:

If we are looking for an XPath path for one or a piece of element, you can hold down SHIFT and move to the block, and the box above will show the XPath path to the element, and the parsed text will be displayed on the right, and we can change the XPath path ourselves. The program will also automatically display the corresponding location, it is convenient to help us to determine whether our XPath statement is written correctly.

Although this small plug-in is very convenient to use, but it is not omnipotent, there are two problems:

1.XPath Helper automatically extracts the XPath from the root path, which almost inevitably lead to XPath too long, not conducive to maintenance;

2. When extracting the list data for a loop, the XPath Helper is using the subscript to extract each piece of data separately from the list, which is not suitable for batch processing of the program, or the need to manually modify some similar to the * tag.

However, a reasonable use of XPath, or can save us a lot of time!

Crawler, web analysis and Analytic Assistant tool Xpath-helper

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.