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

from locations.items import GeojsonPointItem


class SuperAmericaSpider(scrapy.Spider):
    name = "superamerica"
    allowed_domains = ["superamerica.com"]
    start_urls = (
        'http://superamerica.com/wp-admin/admin-ajax.php?action=store_search&lat=45.0&lng=-90.0&max_results=0&search_radius=500',
        'http://superamerica.com/wp-admin/admin-ajax.php?action=store_search&lat=42.0&lng=-87.0&max_results=0&search_radius=500',
    )

    def store_hours(self, store_hours):
        matches = re.findall(r'<tr><td>(.*?)<\/td><td><time>(.*?)<\/time><\/td><\/tr>', store_hours)

        day_groups = []
        this_day_group = None

        for day, hours in matches:
            day = day[:2]
            match = re.search(r'(\d{1,2}):(\d{2}) ([AP])M - (\d{1,2}):(\d{2}) ([AP])M', hours)
            (f_hr, f_min, f_ampm, t_hr, t_min, t_ampm) = match.groups()

            f_hr = int(f_hr)
            if f_ampm == 'P':
                f_hr += 12
            elif f_ampm == 'A' and f_hr == 12:
                f_hr = 0
            t_hr = int(t_hr)
            if t_ampm == 'P':<commit_msg>Don't need the second call<commit_after># -*- coding: utf-8 -*-
import scrapy
import json
import re

from locations.items import GeojsonPointItem


class SuperAmericaSpider(scrapy.Spider):
    name = "superamerica"
    allowed_domains = ["superamerica.com"]
    start_urls = (
        'http://superamerica.com/wp-admin/admin-ajax.php?action=store_search&lat=45.0&lng=-90.0&max_results=0&search_radius=500',
    )

    def store_hours(self, store_hours):
        matches = re.findall(r'<tr><td>(.*?)<\/td><td><time>(.*?)<\/time><\/td><\/tr>', store_hours)

        day_groups = []
        this_day_group = None

        for day, hours in matches:
            day = day[:2]
            match = re.search(r'(\d{1,2}):(\d{2}) ([AP])M - (\d{1,2}):(\d{2}) ([AP])M', hours)
            (f_hr, f_min, f_ampm, t_hr, t_min, t_ampm) = match.groups()

            f_hr = int(f_hr)
            if f_ampm == 'P':
                f_hr += 12
            elif f_ampm == 'A' and f_hr == 12:
                f_hr = 0
            t_hr = int(t_hr)
            if t_ampm == 'P':
{'fraction_non_alphanumeric': 0.17855540601166442, 'fraction_numerical': 0.02512337371018394, 'mean_word_length': 2.3135215453194653, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '648646', 'n_tokens_mistral': 877, 'n_tokens_neox': 825, 'n_words': 144}