1 def start_requests(self): 2 cookies = 'anonymid=jcokuqwe................省略' 3 # 首先是对cookies进行分割以;为节点 4 ookies = {i.split("=")[0]:i.split("=")[1] for i in cookies.split(";")} 5 yield scrapy.Request( 6 self.start_urls[0], 7 callback=self.parse, 8 cookies=cookies 9 ) 10