<commit_before># -*- coding: utf-8 -*-
import scrapy
import json
import re
import traceback

from locations.items import GeojsonPointItem


class QuiznosSpider(scrapy.Spider):
    name = "quiznos"
    allowed_domains = ["restaurants.quiznos.com"]
    start_urls = (
        'http://restaurants.quiznos.com/data/stores.json?callback=storeList',
    )

    def parse(self, response):

        try:
            data = response.body_as_unicode()
            stores = json.loads(re.search('storeList\((.*)\)', data).group(1))
        except:
            stores = None
            self.log('Error while parsing the json data'.format(traceback.format_exc()))

        for store in stores:

            yield GeojsonPointItem(
                lat=store.get('latitude'),
                lon=store.get('longitude'),
                ref=str(store.get('storeid')),
                phone=store.get('phone'),
                name=store.get('restaurantname'),
                opening_hours=store.get('businesshours'),<commit_msg>update exception issue<commit_after># -*- coding: utf-8 -*-
import scrapy
import json
import re
import traceback

from locations.items import GeojsonPointItem


class QuiznosSpider(scrapy.Spider):
    name = "quiznos"
    allowed_domains = ["restaurants.quiznos.com"]
    start_urls = (
        'http://restaurants.quiznos.com/data/stores.json?callback=storeList',
    )

    def parse(self, response):
        data = response.body_as_unicode()
        stores = json.loads(re.search('storeList\((.*)\)', data).group(1))

        for store in stores:

            yield GeojsonPointItem(
                lat=store.get('latitude'),
                lon=store.get('longitude'),
                ref=str(store.get('storeid')),
                phone=store.get('phone'),
                name=store.get('restaurantname'),
                opening_hours=store.get('businesshours'),
{'fraction_non_alphanumeric': 0.1326963906581741, 'fraction_numerical': 0.0021231422505307855, 'mean_word_length': 2.378136200716846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5497702', 'n_tokens_mistral': 580, 'n_tokens_neox': 546, 'n_words': 97}