Skip to content

Instantly share code, notes, and snippets.

@aahmd
Created September 12, 2018 10:58
Show Gist options
  • Save aahmd/ffb4bae5475c1d4127955e71f3b4a06c to your computer and use it in GitHub Desktop.
Save aahmd/ffb4bae5475c1d4127955e71f3b4a06c to your computer and use it in GitHub Desktop.
pizza
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