-2

I am making a webscraper and have got a scraped number inside Pricefinal, for this instance right now it is 260, I am trying to find the xpath using the number I have inside Pricefinal but I am having issues with this line of code:

item = driver.find_elements_by_xpath("//*[contains(text(), 'Pricefinal')]")

When I execute the code it will only searh for the word Pricefinal instead of the value inside the string, I have tried using this code

item = driver.find_elements_by_xpath("//*[contains(text(), "(pricefinal)")]")``` but am getting unmatched errors on ]

The url is this.

1
  • show url and minimal working code. Commented Jun 19, 2020 at 4:07

1 Answer 1

0

Try to use XPATH axes to find all descendants inside tag with text "pricefinal". If you have any difficulties just place here html part and i can give u better advice

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.