Created
September 12, 2018 10:58
-
-
Save aahmd/ffb4bae5475c1d4127955e71f3b4a06c to your computer and use it in GitHub Desktop.
pizza
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scrapy.spiders import CrawlSpider | |
from scrapy.loader.processors import Identity, TakeFirst | |
import logging | |
logger = logging.getLogger(__name__) | |
class PizzaSpider(CrawlSpider): | |
"""Get addresses for all Donatos locations.""" | |
name = 'pizza' | |
start_urls = [ | |
'https://www.donatos.com/locations/all' | |
] | |
def parse(self, response): | |
import pdb; pdb.set_trace() | |
# location_name = response.xpath('/html/body/div[2]/div[2]/main/div/ul/li[161]/div/h2/text()').extract() | |
# address = response.xpath('/html/body/div[2]/div[2]/main/div/ul/li[1]/div/p[1]/text()').extract_first() | |
# phone = response.xpath('/html/body/div[2]/div[2]/main/div/ul/li[161]/div/p[2]/a/text()').extract_first() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment