def parse(self, response): for link in self.link_extractor.extract_links(response): yield Request(link.url, self.parse) strip_path = HtmlXPathSelector(response).select('//meta[@property="og:image"]/@content').extract() if strip_path: strip = DilbertStrip() strip['image'] = strip_path.pop() strip['name'] = '%s.gif' % response.url.split('/')[-1] yield strip