0
votes

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()
1
normalize-space() for which text? Update the question with the relevant text based HTML. - DebanjanB
the text is in the span element - jim Burns
//table[@id='PlaceHolderMain_gvUnitShippingInfo']/tbody/tr[position() >1]/td[1]/span/text() - jim Burns

1 Answers

0
votes

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()