Download and Sign Up
Get a $5 Coupon For Free
Getting Started Main Features

How to find XPath in Chrome - ScrapeStorm

2020-07-03 16:05:38

Abstract:This tutorial will show an easy way to get XPath of the element in Chrome. ScrapeStormFree Download

What is XPath?

XPath is a major element in the XSLT standard.

XPath stands for XML Path Language, it is a language for finding information in XML documents. It was originally used to search for XML documents, but it is also suitable for searching HTML documents. So when doing crawlers, you can use XPath to extract the corresponding information.


XPath uses “path like” syntax to identify and navigate nodes in an XML document.

In addition, it also provides more than 200 built-in functions for string, numeric, and time matching, as well as the processing of nodes and sequences. Almost all the nodes you want to locate can be selected using XPath.


How to get the XPath of the element?

1. Open Chrome and find a website.


2. Press F12 or right-click \”Inspect“\ or use the shortcut key Ctrl+Shift+I.


3. Click the button in the upper left corner or press CTRL+SHIFT+C.


4. After pressing the button and moving the mouse to the page, you will find that different colors appear in different locations.


5. At this point we click any location, elements will change.


6. Right-click in the area where the color changes, Copy->Copy XPath can copy XPath from the webpage, and then press CTRL+V to check whether the copy is successful.


This is the copied XPath


P.S. This operation is just the first step in getting web content or crawlers. If you need more, you can search for related tutorials.


Disclaimer: This article is contributed by our user. Please advise to remove immediately if any infringement caused.

Download videos in batches Match emails with Regex Download images in batches Download web page as word python crawler Data scraping with python php crawler Generate URLs in batches python download file Keyword extraction from web content