I'm trying to scrape data from gelbeseiten.de (yellow pages in germany)
# -*- coding: utf-8 -*-
import scrapyfrom scrapy.spiders import CrawlSpiderfrom scrapy.http import Requestfrom scrapy.selector import Selectorfrom scrapy.http import HtmlResponseclass GelbeseitenSpider(scrapy.Spider):name = "gelbeseiten"allowed_domains = ["http://www.gelbeseiten.de"]start_urls = ['http://www.gelbeseiten.de/zoohandlungen/s1/alphabetisch']def parse(self, response):for adress in response.css('article'):#Strassestrasse = adress.xpath('//span[@itemprop="streetAddress"]//text()').extract_first()#Namename = adress.xpath('//span[@itemprop="name"]//text()').extract_first()#PLZplz = adress.xpath('//span[@itemprop="postalCode"]//text()').extract_first()#Stadtstadt = adress.xpath('//span[@itemprop="addressLocality"]//text()').extract_first()yield {'name': name,'strasse': strasse,'plz': plz,'stadt': stadt,}
As the result i get 15 sets with always the same address but i think it should be 15 different addresses.
I appreciate any help.