def parse(self, response): sel = Selector(response) image_url = sel.xpath("//div[@id='post_content_75283192143']/img[@class='BDE_Image']/@src").extract() item = AiriPicItem() item['airi_image_url'] = image_url yield item
def parse(self,response): sel = scrapy.Selector(response) image_url = sel.xpath('//div[@id="post_content_75283192143"]/img[@class="BDE_Image"]/@src').extract() item = AiriPicItem() item['airi_image_url'] = image_url yield item
def parse(self, response): sel = Selector(response) image_url = sel.xpath("//*[@id='post_content_75283192143']/img[1]/@src").extract() print('the urls: \n') print(image_url) print('\n') item = AiriPicItem() item['airi_image_url'] = image_url yield item
def parse(self,response): sel=Selector(response) image_url=sel.xpath("//div[@id='post_content_75283192143']/img['BDG_Image']/@src").extract() print 'the urls:/n' print image_url print '/n' item=AiriPicItem() item['airi_image_url']=image_url yield item