And vice versa, we get the title based on the price:

Unite professionals to advance email dataset knowledge globally.
Post Reply
hasibaakterss3309
Posts: 798
Joined: Thu Jan 02, 2025 7:12 am

And vice versa, we get the title based on the price:

Post by hasibaakterss3309 »

xpath relationships
Sibling – sister element
Sibling moves to adjacent elements located at the same level. There are two types - preceding-sibling - a sibling element located above the specified one and following-sibling - a sibling element located below the specified one.

For example, we will get the price based on the title:





Parent and child – parent and child
Commands that allow you to go down or up a level. denmark telegram database There can be several levels of nesting, if you need to go down or up several levels, use / as a separator.

Child – children, an element that is nested one level down from the parent. For example, let's find the price from the parent div element:


Parent – ​​a parent element that allows you to go up a level, to be from a nested element. For example, we will get the name of a category with the number of products, based on the name of the category:


Parent can also be replaced with /.. so the code above will look like this:


CSS syntax and usage for parsing
CSS locators or styles are another option for getting data from a site. CSS is convenient to use because you can specify the class of an element (if it is unique). Let's return to this page for examples. For example, to get all the names, just write a style with a dot before it. You can see the style in the developer tool on the styles tab (don't forget to select CSS in the selector type in the extension):

css-title
.woocommerce-loop-product__title
To get the price, just specify its style: .price try it, it's easy.

id to search for the required data
Next, we go to the search results page , since it contains the elements we need. If the elements in the code are marked with id, then it is enough to specify the # symbol and the id value:

#hdtbMenus

Search by attribute value
Search by attribute value is used when there is no unique class or the id is generated. Syntax: element[attribute=”attribute value”]. For example:
Post Reply