Repository: alltheplaces/alltheplaces

Issue:
Blooms The Chemist (Australian pharmacy/chemist)
### Brand name

Blooms The Chemist

### Wikidata ID

Q63367543

### Store finder url(s)

https://api.storepoint.co/v1/15f056510a1d3a/locations?lat=0&long=0&radius=100000

Sample response for a store:
```
{
	"5": {
		"color": null,
		"custom_fields": null,
		"description": "",
		"email": "bullcreek@blooms.net.au",
		"extra": "",
		"extra2": null,
		"extra3": null,
		"facebook": "0",
		"friday": "8:00 AM - 8:30 PM",
		"id": 22972158,
		"image_url": "",
		"instagram": "0",
		"loc_lat": -32.06333,
		"loc_long": 115.85824,
		"monday": "8:00 AM - 8:30 PM",
		"name": "Bull Creek",
		"phone": "08 9332 3777",
		"priority": null,
		"saturday": "8:00 AM - 8:30 PM",
		"streetaddress": "Shop 7, Stockland Bull Creek Shopping Centre, South Street, Bull Creek, WA 6149, Australia",
		"sunday": "8:00 AM - 8:30 PM",
		"tags": "click & collect,influenza (flu) vaccination,measles mumps rubella vaccination,whooping cough vaccination (dtpa)",
		"thursday": "8:00 AM - 8:30 PM",
		"tuesday": "8:00 AM - 8:30 PM",
		"twitter": "0",
		"website": "https://www.bloomsthechemist.com.au/store-bull-creek",
		"wednesday": "8:00 AM - 8:30 PM",
		"distance": 7717.65
	}
}
```


Discussion:

Resolving patch:
diff --git a/locations/spiders/blooms_the_chemist_au.py b/locations/spiders/blooms_the_chemist_au.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/blooms_the_chemist_au.py
@@ -0,0 +1,25 @@
+import re
+
+from locations.hours import DAYS_FULL, OpeningHours
+from locations.storefinders.storepoint import StorepointSpider
+
+
+class BloomsTheChemistAUSpider(StorepointSpider):
+    name = "blooms_the_chemist_au"
+    item_attributes = {"brand": "Blooms The Chemist", "brand_wikidata": "Q63367543"}
+    key = "15f056510a1d3a"
+
+    def parse_item(self, item, location: {}, **kwargs):
+        item["addr_full"] = item.pop("street_address")
+
+        item["opening_hours"] = OpeningHours()
+        for day in DAYS_FULL:
+            if times := location.get(day.lower()):
+                for start_hour, start_min, start_am_pm, end_hour, end_min, end_am_pm in re.findall(
+                    r"(\d+):(\d+)\s*(AM|PM)\s*-\s*(\d+):(\d+)\s*(AM|PM)", times, flags=re.IGNORECASE
+                ):
+                    start_time = f"{start_hour}:{start_min} {start_am_pm}"
+                    end_time = f"{end_hour}:{end_min} {end_am_pm}"
+                    item["opening_hours"].add_range(day, start_time, end_time, time_format="%I:%M %p")
+
+        yield item
diff --git a/locations/storefinders/storepoint.py b/locations/storefinders/storepoint.py
new file mode 100644
--- /dev/null
+++ b/locations/storefinders/storepoint.py
@@ -0,0 +1,28 @@
+from scrapy import Spider
+from scrapy.http import JsonRequest
+
+from locations.dict_parser import DictParser
+
+
+class StorepointSpider(Spider):
+    key = ""
+
+    custom_settings = {"ROBOTSTXT_OBEY": False}
+
+    def start_requests(self):
+        yield JsonRequest(url=f"https://api.storepoint.co/v1/{self.key}/locations")
+
+    def parse(self, response, **kwargs):
+        if not response.json()["success"]:
+            return
+
+        for location in response.json()["results"]["locations"]:
+            item = DictParser.parse(location)
+
+            item["lat"] = location["loc_lat"]
+            item["lon"] = location["loc_long"]
+
+            yield from self.parse_item(item, location)
+
+    def parse_item(self, item, location: {}, **kwargs):
+        yield item


Test patch: