Python 如何刮取其他url并将数据附加到项目集-刮取

Python 如何刮取其他url并将数据附加到项目集-刮取,python,scrapy,web-crawler,Python,Scrapy,Web Crawler,我尝试将昨天和明天的预测添加到数据集中,但我不知道如何传递昨天和明天的url,我尝试使用append,但这会将信息添加到我的实际字段中,我需要将每个信息添加到数据库中各自的字段中 def parse_daily(self, response): morePredictions = response.css('div.more-data > a::attr(href)').extract() yesterday = response.css('main >

我尝试将昨天和明天的预测添加到数据集中,但我不知道如何传递昨天和明天的url,我尝试使用append,但这会将信息添加到我的实际字段中,我需要将每个信息添加到数据库中各自的字段中

def parse_daily(self, response):
        morePredictions = response.css('div.more-data > a::attr(href)').extract()
        yesterday = response.css('main > nav > a:nth-child(1)::attr(href)').extract_first()
        tomorrow = response.css('main > nav > a:nth-child(3)::attr(href)').extract_first()
        morePredictions.append(yesterday)
        morePredictions.append(tomorrow)

        item = {
                'name':sign,
                'Description':descripcion,
            }

        for signurl in morePredictions:
            absolute_url = response.urljoin(signurl)
            yield response.follow(absolute_url,meta={"signUrl": signurl, "signName": sign, 'item': item}, callback=self.parse_extras)

你能分享完整的代码吗?您可以使用“开始URL”。我假设两个链接都具有相同的html结构,因此使用start_URL时,它将使用相同的解析方法对两个URL进行刮取。我认为你需要改变你的逻辑