I am trying to scrape this website using scrapy, xpath and regex. I have checked and tried the answers to this question: xpath+ regex: matches text
I want to create a 'scrapy.selector.unified.SelectorList' of <p>
that contain the text "11 (sun)" or "9 (fri)" and such, and loop through the list.
event = response.xpath('//p[matches(text(), "\d+\s\(\w{3}\)")]').extract()
does not work.
FYI, below does work.
event = response.xpath('//p[contains(text(), "11 (sun)")]').extract()
What am I missing here?