If a part of the value located in any part of it is known, * is used

At Telemarketing Data Forum, professionals gather to share insights, verified contact lists, and proven strategies for successful outreach.
Post Reply
hasibaakterss3309
Posts: 1064
Joined: Thu Jan 02, 2025 1:12 pm

If a part of the value located in any part of it is known, * is used

Post by hasibaakterss3309 »

css-attribute
Partial match search
There are cases when it is necessary to use the attribute value not as a whole, but partially, for example, when a set of elements contains a common part. Let's consider dominican republic telegram database the example of the code written above, all the proposed options will give the same result.



div[class*="TBKo"]
If you need to search by the initial part of the value, ^ is used.

div[class^="KTB"]
If you need to search by the final part of the value, $ is used.

div[class$="Koe"]
If the meaning of words is separated by a space, one of which is known exactly, ~ is used.

div[class~="KTBKoe"]
CSS Relationships
The principle is the same as in xpath. If you need to get the value of a nested element, use > one level lower

div[class="Lj8KXd yyoM4d"]>span
If you need to get the value of a nested element, one level below, use a space

css-child
div[class="Lj8KXd yyoM4d"] div.KTBKoe
CSS does not allow finding the parent, because the search goes from top to bottom.

The possibilities of Xpath and CSS are much wider, but the examples considered are a good base, which will allow you to solve most problems. You can always look for a ready-made preset in our catalog or, if your tasks are more extensive, contact our specialists for data parsing.
Post Reply