Repository: alltheplaces/alltheplaces

Issue:
Santa Isabel

### Brand name

Santa Isabel

### Wikidata ID

Q7419620
https://www.wikidata.org/wiki/Q7419620
https://www.wikidata.org/wiki/Special:EntityData/Q7419620.json

### Store finder url(s)
https://www.santaisabel.cl/locales?page=1
Official Url(s): http://www.santaisabel.cl/
- [x] I have run the below and if anything in generated, added it.
- [ ] I have manually checked for a storefinder
- [ ] This is not a manufacturer listing outlets operating under their own brands / this will not create duplicates
`pipenv run scrapy sf --brand-wikidata=Q7419620 http://www.santaisabel.cl/`
```
```


Discussion:

Resolving patch:
diff --git a/locations/hours.py b/locations/hours.py
--- a/locations/hours.py
+++ b/locations/hours.py
@@ -450,10 +450,12 @@
     "Vi": "Fr",
     "Sabado": "Sa",
     "Sábado": "Sa",
+    "Sábados": "Sa",
     "Sab": "Sa",
     "Sáb": "Sa",
     "Sa": "Sa",
     "Domingo": "Su",
+    "Domingos": "Su",
     "Dom": "Su",
     "Do": "Su",
 }
diff --git a/locations/spiders/santa_isabel_cl.py b/locations/spiders/santa_isabel_cl.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/santa_isabel_cl.py
@@ -0,0 +1,54 @@
+import re
+
+from scrapy import Spider
+from scrapy.http import JsonRequest
+from unidecode import unidecode
+
+from locations.categories import Categories
+from locations.hours import DAYS_ES, DELIMITERS_ES, OpeningHours
+from locations.items import Feature
+
+
+class SantaIsabelCLSpider(Spider):
+    name = "santa_isabel_cl"
+    item_attributes = {
+        "brand": "Santa Isabel",
+        "brand_wikidata": "Q7419620",
+        "extras": Categories.SHOP_SUPERMARKET.value,
+    }
+    allowed_domains = ["assets.santaisabel.cl"]
+    start_urls = ["https://assets.santaisabel.cl/json/cms/page-1506.json"]
+
+    def start_requests(self):
+        for url in self.start_urls:
+            yield JsonRequest(url=url)
+
+    def parse(self, response):
+        for location in response.json()["acf"]["localities"]:
+            properties = {
+                "ref": unidecode(location.get("name").lower()).replace(" ", "-"),
+                "name": location.get("name"),
+                "street_address": location.get("address"),
+                "city": location.get("cities"),
+                "state": location.get("regions"),
+            }
+
+            coordinates = re.findall(r"-?\d+\.\d*", location.get("geolocation"))
+            if len(coordinates) == 2:
+                properties["lat"] = coordinates[0]
+                properties["lon"] = coordinates[1]
+
+            hours_string = (
+                re.sub(
+                    r"\s+",
+                    " ",
+                    location.get("schedule").replace("<br />", " ").replace("<b>", " ").replace("</b>", " "),
+                )
+                .replace("Sábados, Domingos y Festivos", "Sábados a Domingos")
+                .replace("Domingos y Festivos", "Domingos")
+                .strip()
+            )
+            properties["opening_hours"] = OpeningHours()
+            properties["opening_hours"].add_ranges_from_string(hours_string, days=DAYS_ES, delimiters=DELIMITERS_ES)
+
+            yield Feature(**properties)


Test patch: