Make Scrapy follow links and collect data
问题 I am trying to write program in Scrapy to open links and collect data from this tag: <p class="attrgroup"></p> . I've managed to make Scrapy collect all the links from given URL but not to follow them. Any help is very appreciated. 回答1: You need to yield Request instances for the links to follow, assign a callback and extract the text of the desired p element in the callback: # -*- coding: utf-8 -*- import scrapy # item class included here class DmozItem(scrapy.Item): # define the fields for