0

The following line is a scrapy selector. How would I apply normalize-space() to this?

rows.xpath("//table[@id='PlaceHolderMain']/tbody/tr/td[1]/span/text()").get()
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
jim Burns
  • 11
  • 3

1 Answers1

0

To use the text jim Burns through normalize-space() you can use the following based Locator Strategy:

ows.xpath("//table[@id='PlaceHolderMain']/tbody/tr/td[1]/span[normalize-space()='jim Burns']").get()
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • thanks. that looks like the answers i've seen. thing is.. i'm using the xpath statement to scrape a webpage. i don't know what the text is going to be. its whatever is in the span element – jim Burns Dec 27 '20 at 22:13