Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Scrapy Shell extract text only from div class element

$
0
0

I am trying to pull only the dates values from this site http://www.nflweather.com/

I believe I have the code but I need to clean up the result a little bit

response.xpath('//div[@class="fw-bold text-wrap"]/text()').extract()

My result returns \n\t

'\n\t\t\t12/28/23 08:15 PM EST\n\t\t'

I am looking to just get a nice clean date. I have see some other version here that do it in the script I would like to be able to have it done from the Scrapy shell.


Viewing all articles
Browse latest Browse all 23131

Trending Articles