打算传多余的参数,来处理。最终采取如下方式:
def handle_info_dict(self,info_dict):
for key in info_dict:if isinstance(info_dict[key],dict):
m3u8_url = info_dict[key]['VideoUrl']+'/'+info_dict[key]['VideoID']
print(m3u8_url)
self.crawl(m3u8_url, save=info_dict[key], callback=self.detail_page)
@config(age=1*60*60, priority=2)
def detail_page(self, response):
print(response.save)