internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: alltheplaces/alltheplaces

Issue:
Kwik Trip
https://www.kwiktrip.com/Locations


Discussion:
assigning to myself
No progress for 5 days, re-opening this for others.
Copy that, my apologies, fighting with the postback on the page. I had it returning records but not paginating. 

I won't wait 5 days on the next one to move on to another.
If you're still working on it feel free to claim it again and put up a pull request with what you've got so far.
working on this

Resolving patch:
diff --git a/locations/spiders/kwik_trip.py b/locations/spiders/kwik_trip.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/kwik_trip.py
@@ -0,0 +1,51 @@
+import scrapy
+from locations.items import GeojsonPointItem
+
+
+class KwikTripSpider(scrapy.Spider):
+    name = "kwiktrip"
+    allowed_domains = ["www.kwiktrip.com"]
+    download_delay = 0
+    user_agent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) " \
+                 "AppleWebKit/537.36 (KHTML, like Gecko) " \
+                 "Chrome/63.0.3239.84 Safari/537.36"
+    start_urls = (
+        'https://www.kwiktrip.com/Locations/Maps-Downloads/Store-List',
+    )
+
+    def parse_page(self, response):
+        row = response.xpath('//tr')
+        for i in row:
+            storeid = i.xpath('./td[1]/text()').extract_first()
+            name = i.xpath('./td[2]/text()').extract_first()
+            street = i.xpath('./td[3]/text()').extract_first()
+            city = i.xpath('./td[4]/text()').extract_first()
+            state = i.xpath('./td[5]/text()').extract_first()
+            postcode = i.xpath('./td[6]/text()').extract_first()
+            phone = i.xpath('./td[7]/text()').extract_first()
+            lat = i.xpath('./td[8]/text()').extract_first()
+            lon = i.xpath('./td[9]/text()').extract_first()
+            addr_full = "{} {}, {} {}".format(street, city, state, postcode)
+
+            yield GeojsonPointItem(
+                ref=storeid,
+                name=name,
+                street=street,
+                city=city,
+                state=state,
+                postcode=postcode,
+                addr_full=addr_full,
+                phone=phone,
+                lat=lat,
+                lon=lon,
+            )
+
+    def parse(self, response):
+        for i in range(8):
+            yield scrapy.FormRequest.from_response(response, formdata={
+                '__EVENTTARGET': 'p$lt$ctl04$pageplaceholder$p$lt$ctl03'
+                                 '$KwikTrip_LocationsList$gridStores$p$p',
+                '__EVENTARGUMENT': str(i),
+                'p$lt$ctl04$pageplaceholder$p$lt$ctl03$KwikTrip_LocationsList'
+                '$gridStores$p$drpPageSize': '100',
+            }, dont_click=True, callback=self.parse_page)


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
Biggby Coffee
http://www.biggby.com/locations/


Discussion:
No progress for 6 days, re-opening this for others.
progress made, doing polish on script today, please leave assigned to me.

Resolving patch:
diff --git a/locations/spiders/biggby.py b/locations/spiders/biggby.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/biggby.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+import json
+import scrapy
+from xml.etree import ElementTree as ET
+from scrapy import Selector
+
+from locations.items import GeojsonPointItem
+
+
+class BiggbySpider(scrapy.Spider):
+	name = "biggby"
+	allowed_domains = ["www.biggby.com"]
+	start_urls = (
+		'https://www.biggby.com/locations/',
+	)
+
+	def parse(self, response):
+		# retrieve XML data from DIV tag
+		items = response.xpath("//div[@id='loc-list']/markers").extract()
+		# convert data variable from unicode to string
+		items = [str(x) for x in items]
+		# create element tree object
+		root = ET.fromstring(items[0])
+
+		# iterate items
+		for item in root:
+			yield GeojsonPointItem(
+				ref=item.attrib['pid'],
+				lat=float(item.attrib['lat']),
+				lon=float(item.attrib['lng']),
+				addr_full=item.attrib['address-two'],
+				city=item.attrib['city'],
+				state=item.attrib['state'],
+				postcode=item.attrib['zip'],
+				name=item.attrib['name'],
+			)
\ No newline at end of file


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
Dress Barn
https://locations.dressbarn.com/


Discussion:
Started to work on this.

Resolving patch:
diff --git a/locations/spiders/dress_barn.py b/locations/spiders/dress_barn.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/dress_barn.py
@@ -0,0 +1,71 @@
+# -*- coding: utf-8 -*-
+import json
+import re
+import scrapy
+
+from locations.items import GeojsonPointItem
+
+
+SCRIPT_JSON = 'normalize-space(//script[@type="application/ld+json"]/text())'
+PHONE = 'normalize-space(//span[@class="telephone-text bold"]//text())'
+
+
+class DressBarn(scrapy.Spider):
+
+    name = 'dressbarn'
+    download_delay = 0.2
+    allowed_domains = ('locations.dressbarn.com', )
+    start_urls = (
+        'https://locations.dressbarn.com',
+    )
+
+    def parse_stores(self, response):
+
+        app_json = json.loads(response.xpath(SCRIPT_JSON).extract_first())
+        hours = app_json[0]['openingHours'].replace(' - ', '-').split()
+        hours = [re.sub(r'[:]$', '', day_hour) for day_hour in hours]
+
+        props = {
+            'addr_full': response.xpath('//meta[@name="address"]/@content').extract_first(),
+            'phone': response.xpath(PHONE).extract_first(),
+            'city': response.xpath('//meta[@name="city"]/@content').extract_first(),
+            'state': response.xpath('//meta[@name="state"]/@content').extract_first(),
+            'postcode': response.xpath('//meta[@name="zip"]/@content').extract_first(),
+            'lat': float(app_json[0]['geo']['latitude']),
+            'lon': float(app_json[0]['geo']['longitude']),
+            'opening_hours': "; ".join(['{} {}'.format(x[0], x[1]) for x in zip(*[iter(hours)]*2)]),
+            'ref': response.url,
+            'website': response.url
+        }
+
+        return GeojsonPointItem(**props)
+
+    def parse_city_stores(self, response):
+
+        stores = response.xpath(
+            '//div/a[@class="store-info flex flex-hor"]/@href').extract()
+        for store in stores:
+            yield scrapy.Request(
+                response.urljoin(store),
+                callback=self.parse_stores
+            )
+
+    def parse_state(self, response):
+
+        city_urls = response.xpath(
+            '//div[@class="map-list-item is-single"]/a/@href').extract()
+        for path in city_urls:
+            yield scrapy.Request(
+                response.urljoin(path),
+                callback=self.parse_city_stores
+            )
+
+    def parse(self, response):
+
+        urls = response.xpath(
+            '//div[@class="map-list-item is-single"]/a/@href').extract()
+        for path in urls:
+            yield scrapy.Request(
+                response.urljoin(path),
+                callback=self.parse_state
+            )


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
GameStop
http://www.gamestop.com/stores


Discussion:
No progress for 4 days, re-opening this for others.

Resolving patch:
diff --git a/locations/spiders/gamestop.py b/locations/spiders/gamestop.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/gamestop.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+import json
+import scrapy
+
+from locations.items import GeojsonPointItem
+
+
+class GamestopSpider(scrapy.Spider):
+	name = "gamestop"
+	allowed_domains = ["www.gamestop.com"]
+	start_urls = (
+		'https://spatial.virtualearth.net/REST/v1/data/8f92e4701aa94bbba485642dc6d15873/_AllStores/StoreSchema?s=1&$format=json&callback=getStoreInfoSuccess&spatialFilter=&$filter=DisplayType%20Eq%20%271%27%20and%20StoreName%20Ne%20%27GameStop.com%27%20and%20StoreName%20Ne%20%27Internet%20/%20Stores%27%20and%20StoreName%20Ne%20%27GameStop%20Military%27&key=AleEo0hykwhhc2_vhIDzSZvfqbcmdTVzwZp3TrNliPr6CPJtxveXCdwIr7zAHu2O&$top=250&callback=jQuery111105958918103101543_1513486119155&_=1513486119161',
+	)
+	
+	def parseAddr(self,addr1,addr2):
+		if addr2=='':
+			return addr1	
+		else:
+			return addr1 + ', ' + addr2
+
+	def parse(self, response):
+		# retrieve JSON data from REST endpoint
+		# items = response.xpath('//text()').extract()
+		
+		# convert data variable from unicode to string
+		# items = str(items)
+		
+		# convert type string representation of list to type list
+		# data = [items]
+
+		# load list into json object for parsing
+		jsondata = json.loads(response.body_as_unicode())
+
+		# iterate items
+		for item in jsondata['d']['results']:
+			# print str(item['Address1'])
+			yield GeojsonPointItem(
+				ref=item['EntityID'],
+				lat=float(item['Latitude']),
+				lon=float(item['Longitude']),
+				addr_full=self.parseAddr(item['Address1'],item['Address2']),
+				city=item['Locality'],
+				state=item['AdminDistrict'],
+				postcode=item['PostalCode'],
+				name=item['MallName'],
+				phone=item['Phone'],
+				opening_hours=item['StoreHours'],
+			)
\ No newline at end of file


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
How are these guys still even a thing? (Coffee Time)
http://www.coffeetime.com/locations.aspx


Discussion:
 Website was down yesterday, so I started working on another spider. Unassigned to open up for others. 
working on this

Resolving patch:
diff --git a/locations/spiders/coffee_time.py b/locations/spiders/coffee_time.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/coffee_time.py
@@ -0,0 +1,57 @@
+import scrapy
+from locations.items import GeojsonPointItem
+
+
+class BobsSpider(scrapy.Spider):
+    name = 'coffeetime'
+    allowed_domains = ['www.coffeetime.com']
+    start_urls = ['http://www.coffeetime.com/locations.aspx?address=&Countryui=CA&pageNumber=1']
+
+    def parse_store(self, response):
+        container = response.xpath('//div[contains(@class, "col-md-9")]')
+        for i in container:
+            street = i.xpath('.//div/p[1]/text()').extract_first().strip()
+            cty_st_zip = i.xpath('.//div/p[2]/text()').extract_first().strip()
+
+            # Keep missing phone/<li> from breaking script
+            if i.xpath('.//div/ul/li[2]/p/text()').extract_first():
+                phone = i.xpath('.//div/ul/li[1]/p/text()')\
+                    .extract_first().strip()
+            else:
+                phone = ''
+
+            if i.xpath('.//div/ul/li[2]/p/a/@href').extract_first():
+                lat = i.xpath('.//div/ul/li[2]/p/a/@href').extract_first(
+                    ).split('=')[2].split(',')[0]
+                lon = i.xpath('.//div/ul/li[2]/p/a/@href').extract_first(
+                    ).split('=')[2].split(',')[1]
+            else:
+                lat = i.xpath('.//div/ul/li/p/a/@href').extract_first(
+                ).split('=')[2].split(',')[0]
+                lon = i.xpath('.//div/ul/li/p/a/@href').extract_first(
+                ).split('=')[2].split(',')[1]
+
+            city = cty_st_zip.split(', ')[0]
+            state = cty_st_zip.split(', ')[1].split(', ')[0]
+            postcode = cty_st_zip.split(', ')[2]
+
+            addr_full = "{} {}, {} {}".format(street, city, state, postcode)
+
+            yield GeojsonPointItem(
+                ref=street,
+                city=city,
+                state=state,
+                postcode=postcode,
+                addr_full=addr_full,
+                phone=phone,
+                lat=float(lat),
+                lon=float(lon),
+                country="CA"
+            )
+
+    def parse(self, response):
+        base_url = "http://www.coffeetime.com/locations.aspx?" \
+                   "address=&Countryui=CA&pageNumber="
+        for i in range(1, 9):
+            page = base_url + str(i)
+            yield scrapy.Request(page, callback=self.parse_store)


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
Chase (bank)
https://locator.chase.com


Discussion:
Removing the assignee on this so others can give it a shot. If you're still working on this please push up your work and open a pull request so we can help work through any problems.
Picking this one up again. 

Resolving patch:
diff --git a/locations/spiders/chase.py b/locations/spiders/chase.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/chase.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+import scrapy
+import re
+import json
+from scrapy.utils.gz import gunzip, is_gzipped
+
+from locations.items import GeojsonPointItem
+
+class ChaseSpider(scrapy.Spider):
+    name = "chase"
+    allowed_domains = ['chase.com']
+    start_urls = (
+        'https://locator.chase.com/sitemap-2.xml.gz',
+    )
+
+    def parse(self, response):
+
+        sitemap = gunzip(response.body)
+        regex = re.compile(r'https://locator.chase.com/\w+/\S+(?=</loc>)')
+        city_urls = re.findall(regex, str(sitemap))
+
+        for path in city_urls:
+            yield scrapy.Request(
+                path.strip(),
+                callback=self.parse_store,
+            )
+        else:
+            pass
+
+    def parse_store(self, response):
+
+        if response.xpath('//meta[@itemprop="openingHours"]/@content').extract():
+            openingHours = str(response.xpath('//meta[@itemprop="openingHours"]/@content').extract()).replace("'",'').replace('[','').replace(']','')
+        else:
+            openingHours = response.xpath('//meta[@itemprop="openingHours"]/@content').extract()
+
+        properties = {
+        'name': response.xpath('//h1/span[@itemprop="name"]/text()').extract_first(),
+        'ref': response.xpath('//h1/span[@itemprop="name"]/text()').extract_first(),
+        'addr_full': response.xpath('//span[@itemprop="streetAddress"]/text()').extract_first(),
+        'city': response.xpath('//span[@itemprop="addressLocality"]/text()').extract_first(),
+        'state': response.xpath('//span[@itemprop="addressRegion"]/text()').extract_first(),
+        'postcode': response.xpath('//span[@itemprop="postalCode"]/text()').extract_first(),
+        'website': response.request.url,
+        'opening_hours': openingHours,
+        'lat': float(response.xpath('//meta[@property="place:location:latitude"]/@content').extract_first()),
+        'lon': float(response.xpath('//meta[@property="place:location:longitude"]/@content').extract_first()),
+        }
+
+        yield GeojsonPointItem(**properties)
\ No newline at end of file


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
Currys PC World
Currys PC World is a chain of electronics stores in the UK.

https://www.currys.co.uk/gbuk/s/find-a-store.html



Discussion:

Resolving patch:
diff --git a/locations/spiders/currys_pc_word.py b/locations/spiders/currys_pc_word.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/currys_pc_word.py
@@ -0,0 +1,52 @@
+# -*- coding: utf-8 -*-
+import scrapy
+from locations.items import GeojsonPointItem
+
+countries = ['England', 'Uk', 'Ireland', 'Scotland']
+
+formdata = {
+    'sFormName': 'storeFinder',
+    'storeFind': 'true',
+    'subaction': 'stores_map',
+    'sStoreKeywordHidden': 'england', # Previous search. The choice of england was arbitrary
+    'sStoreGeo': '',          # Appears to not be used
+    'sStoreKeyword': ''}      # Search term
+
+headers = {
+    'Referer': 'https://www.pcworld.co.uk/gbuk/s/find-a-store.html',
+    'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64…) Gecko/20100101 Firefox/57.0'
+}
+
+
+class CurrysPcWorldSpider(scrapy.Spider):
+    name = "currys"
+    allowed_domains = ["https://www.pcworld.co.uk"]
+
+    def start_requests(self):
+        search_url = 'https://www.pcworld.co.uk/gbuk/s/find-a-store.html'
+        for country in countries:
+            formdata['sStoreKeyword'] = country
+            request = scrapy.FormRequest(search_url, formdata=formdata, callback=self.parse)
+            request.meta['country'] = country
+            yield request
+
+    def parse(self, response):
+        stores = response.xpath('//ul[@class = "borderdList storesList"]//li')
+
+        for store in stores:
+            latitude, longitude = store.xpath('@data-location').extract_first().split(', ')
+            address = store.css('div[class="address bsp"]').extract_first()
+            address = address.split(sep='\n') # Separating the data
+            address = [i.strip() for i in address] # Lots of whitespace in the websites' text. Removing.
+            street_address = address[2]
+            city, postal_code = address[3].split(sep=',') # Only relevant section
+            store_url = store.css('a::attr(href)').extract_first()
+
+            yield GeojsonPointItem(
+                ref=store_url,
+                lat=latitude,
+                lon=longitude,
+                addr_full=street_address,
+                city=city,
+                country=response.meta['country']
+            )


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
H&R Block
https://www.hrblock.com/tax-offices/local/


Discussion:

Resolving patch:
diff --git a/locations/spiders/h_r_block.py b/locations/spiders/h_r_block.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/h_r_block.py
@@ -0,0 +1,58 @@
+import scrapy
+import re
+from locations.items import GeojsonPointItem
+
+DAY_MAPPING = {
+    'M': 'Mo',
+    'T': 'Tu',
+    'W': 'We',
+    'F': 'Fr',
+    'Sat': 'Sa',
+    'Sun': 'Su'
+}
+
+
+class HRBlockSpider(scrapy.Spider):
+
+    name = "h_r_block"
+    allowed_domains = ["www.hrblock.com"]
+    download_delay = 0.5
+    start_urls = (
+        'https://www.hrblock.com/tax-offices/local/',
+    )
+
+    def parse_stores(self, response):
+        ref =  re.findall(r"[0-9]+$" , response.url)
+        if(len(ref)>0):
+            ref = ref[0]
+        else:
+            ref = response.url
+        properties = {
+            'addr_full' : ' '.join(response.xpath('//span[@itemprop="streetAddress"]/text()').extract()),
+            'phone' : response.xpath('normalize-space(//span[@itemprop="telephone"]/text())').extract_first(),
+            'city' : response.xpath('normalize-space(//span[@itemprop="addressLocality"]/text())').extract_first(),
+            'state' : response.xpath('normalize-space(//span[@itemprop="addressRegion"]/text())').extract_first(),
+            'postcode' : response.xpath('normalize-space(//span[@itemprop="postalCode"]/text())').extract_first(),
+            'ref' : ref,
+            'website' : response.xpath('//link[@rel="canonical"]/@href').extract_first(),
+            'lat' : response.xpath('normalize-space(//meta[@itemprop="latitude"]/@content)').extract_first(),
+            'lon' : response.xpath('normalize-space(//meta[@itemprop="longitude"]/@content)').extract_first(),
+        }
+        yield GeojsonPointItem(**properties)
+
+    def parse_city_stores(self, response):
+        stores = response.xpath('//div[@itemtype="https://schema.org/LocalBusiness"]/div/div/a/@href').extract()
+        for store in stores:
+            if store:
+                yield scrapy.Request(response.urljoin(store), callback=self.parse_stores)
+
+    def parse_state(self, response):
+
+        city_urls = response.xpath('//div[@class="cities-list clearfix"]/a/@href').extract()
+        for path in city_urls:
+            yield scrapy.Request(response.urljoin(path), callback=self.parse_city_stores)
+
+    def parse(self, response):
+        urls = response.xpath('//div[@class="ol-states clearfix"]/a/@href').extract()
+        for path in urls:
+            yield scrapy.Request(response.urljoin(path), callback=self.parse_state)


Test patch:
Repository: alltheplaces/alltheplaces

Issue:
Payless Shoes
https://www.payless.com/on/demandware.store/Sites-payless-Site/default/Stores-GetNearestStores?postalCode=54701&countryCode=US&distanceUnit=imperial&maxdistance=30


Discussion:

Resolving patch:
diff --git a/locations/spiders/payless.py b/locations/spiders/payless.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/payless.py
@@ -0,0 +1,39 @@
+import scrapy
+from locations.items import GeojsonPointItem
+import json
+
+
+class PaylessSpider(scrapy.Spider):
+    name = "payless"
+    allowed_domains = ["payless.com"]
+    start_urls = (
+        'https://www.payless.com/on/demandware.store/Sites-payless-Site/default/Stores-GetNearestStores?postalCode'
+        '=11230&countryCode=US&distanceUnit=imperial&maxdistance=5000',
+    )
+
+    base_url = "https://www.payless.com/on/demandware.store/Sites-payless-Site/default/Stores-Details?StoreID={}"
+
+    def parse(self, response):
+        stores = json.loads(response.body_as_unicode())
+        for store in stores["stores"].values():
+            street = "{} {}".format(store["address1"], store["address2"]).strip()
+            has_house_number = store["address1"].split(" ")[0].isnumeric()
+            website = self.base_url.format(store["number"])
+            point = {
+                "lat": store["latitude"],
+                "lon": store["longitude"],
+                "name": store["name"],
+                "addr_full": "{street}, {city}, {stateCode}, {postalCode}".format(street=street, **store),
+                "housenumber": store["address1"].split(" ")[0] if has_house_number else None,
+                "street": " ".join(store["address1"].split(" ")[1:]) if has_house_number else store["address1"],
+                "city": store["city"],
+                "state": store["stateCode"],
+                "postcode": store["postalCode"],
+                "country": store["countryCode"],
+                "phone": store["phone"],
+                "website": website,
+                "opening_hours": store["storeHours"].replace("<br>", "; ").replace(" :", ": ").title(),
+                "ref": store["number"],
+            }
+
+            yield GeojsonPointItem(**point)


Test patch: