How Do I Extract This List Using XPath?

Charon3

Newbie
Joined
Nov 30, 2018
Messages
19
Reaction score
1
I’m trying get the list of texts from the filter area using Screaming Frog. What is the XPath I should use? Sorry, I’m not good at XPath. :(

Here's the area where I want to extract: i.imgur.com/NwWIloS.png
URL of one of the pages: etstur.com/Antalya-Otelleri

Thanks in advance for any help.
 
Last edited:
Chropath browser extension should help you and make your life easier too.
 
Something like this:

//*[@id="props10"]/div[1]/label/text()
//*[@id="props10"]/div[2]/label/text()
//*[@id="props10"]/div[3]/label/text()
//*[@id="props10"]/div[4]/label/text()

//*[@id="props11"]/div[1]/label/text()
//*[@id="props11"]/div[2]/label/text()
//*[@id="props11"]/div[3]/label/text()
//*[@id="props11"]/div[4]/label/text()
//*[@id="props11"]/div[5]/label/text()
//*[@id="props11"]/div[6]/label/text()
//*[@id="props11"]/div[7]/label/text()
//*[@id="props11"]/div[8]/label/text()
//*[@id="props11"]/div[9]/label/text()
 
You can do it for yourself easily, using chrome. To do so, open up the page in chrome - press f12 - inspect the element in question - right click - copy - copy xpath.

You will never need to ask anyone again. ;)
 
You can do it for yourself easily, using chrome. To do so, open up the page in chrome - press f12 - inspect the element in question - right click - copy - copy xpath.

You will never need to ask anyone again. ;)

You are correct but sometimes that gives me super retarded ways of selecting it. Like instead of just an @id='foo' I'll get //div/span[1]/td/td/td lol
 
You are correct but sometimes that gives me super retarded ways of selecting it. Like instead of just an @id='foo' I'll get //div/span[1]/td/td/td lol
Yeah, correct. I normally fix those manually. Still, something is better than nothing lol. Also, xpaths are pretty logical, so they are easier to fix than other ways. :)
 
Back
Top