how to return result to the call function? I want my parse2 to return a value back to parse1, so parse1 can store it. right now I am just getting the url value, but not the return value from parse2
def parse1(self, response):
for lst in response.css("tr.lst-rw"):
url = lst.css('td[headers="lh_id"] > a::attr(href)').extract_first()
if url is not None:
url = response.urljoin(url)
res = scrapy.Request(url, callback=self.parse2)
yield{
'response-date' : res
}
def parse2(self, response):
yield{
'response date': response.css('div#dnf::text').extract_first().strip()
}