def get_list_id(self, response):
selector = Selector(response)
# ?????????????
url_list = selector.xpath('//body//a[@class="s-fc0"]/@href')[:-1].extract()
type_ = 0
for url in url_list:
type_ += 1
yield scrapy.FormRequest(url='http://music.163.com/m{}'.format(url), method='GET',
callback=self.parse_song_list, headers=self.headers, meta={'type': type_})
评论列表
文章目录