Scrapy Returns Only First Result
I'm trying to scrape data from gelbeseiten.de (yellow pages in germany) # -*- coding: utf-8 -*- import scrapy from scrapy.spiders import CrawlSpider from scrapy.http import Req
You use absolute xpath expressions:
adress.xpath('//span[@itemprop="streetAddress"]//text()')
while should use relative to address
(note leading dot in expression):
adress.xpath('.//span[@itemprop="streetAddress"]//text()')
Post a Comment for "Scrapy Returns Only First Result"