Repository: alltheplaces/alltheplaces

Issue:
Move Yourself (shop/plant_hire) (AU) (932 locations)
### Brand name

Move Yourself

### Wikidata ID

Q126164464

### Store finder url(s)

```curl 'https://www.moveyourself.com.au/index.php' -X POST -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' --data-raw 'getmapdata=true'```


Discussion:

Resolving patch:
diff --git a/locations/spiders/move_yourself_au.py b/locations/spiders/move_yourself_au.py
new file mode 100644
--- /dev/null
+++ b/locations/spiders/move_yourself_au.py
@@ -0,0 +1,106 @@
+from scrapy import FormRequest, Spider
+
+from locations.categories import Categories
+from locations.dict_parser import DictParser
+from locations.spiders.ampol_au import AmpolAUSpider
+from locations.spiders.bp import BPSpider
+from locations.spiders.coles_au import ColesAUSpider
+from locations.spiders.exxonmobil import ExxonMobilSpider
+from locations.spiders.liberty_au import LibertyAUSpider
+from locations.spiders.night_owl_au import NightOwlAU
+from locations.spiders.otr_au import OTRAUSpider
+from locations.spiders.seven_eleven_au import SEVEN_ELEVEN_SHARED_ATTRIBUTES
+from locations.spiders.shell import ShellSpider
+from locations.spiders.united_petroleum_au import UnitedPetroleumAUSpider
+
+
+class MoveYourselfAUSpider(Spider):
+    name = "move_yourself_au"
+    item_attributes = {
+        "brand": "Move Yourself",
+        "brand_wikidata": "Q126164464",
+        "extras": Categories.SHOP_PLANT_HIRE.value,
+    }
+    allowed_domains = ["www.moveyourself.com.au"]
+    start_urls = ["https://www.moveyourself.com.au/index.php"]
+
+    def start_requests(self):
+        formdata = {"getmapdata": "true"}
+        yield FormRequest(url=self.start_urls[0], formdata=formdata, method="POST", callback=self.parse)
+
+    def parse(self, response):
+        for location in response.json()["depos"].values():
+            item = DictParser.parse(location)
+            item["ref"] = location["depocode"]
+            item["name"] = location["deponame"]
+            match location["depotype"]:
+                case "ampol":
+                    item["located_in"] = AmpolAUSpider.item_attributes["brand"]
+                    item["located_in_wikidata"] = AmpolAUSpider.item_attributes["brand_wikidata"]
+                case "bp":
+                    item["located_in"] = BPSpider.brands["BP"][0]
+                    item["located_in_wikidata"] = BPSpider.brands["BP"][1]
+                case "coles":
+                    item["located_in"] = ColesAUSpider.BRANDS[1]["brand"]
+                    item["located_in_wikidata"] = ColesAUSpider.BRANDS[1]["brand_wikidata"]
+                case "liberty":
+                    item["located_in"] = LibertyAUSpider.item_attributes["brand"]
+                    item["located_in_wikidata"] = LibertyAUSpider.item_attributes["brand_wikidata"]
+                case "metro":
+                    item["located_in"] = "Metro Petroleum"
+                    item["located_in_wikidata"] = "Q111970125"
+                case "otr":
+                    item["located_in"] = OTRAUSpider.item_attributes["brand"]
+                    item["located_in_wikidata"] = OTRAUSpider.item_attributes["brand_wikidata"]
+                case "puma":
+                    item["located_in"] = "Puma"
+                    item["located_in_wikidata"] = "Q7259769"
+                case "shell":
+                    item["located_in"] = ShellSpider.item_attributes["brand"]
+                    item["located_in_wikidata"] = ShellSpider.item_attributes["brand_wikidata"]
+                case "united":
+                    item["located_in"] = UnitedPetroleumAUSpider.UNITED["brand"]
+                    item["located_in_wikidata"] = UnitedPetroleumAUSpider.UNITED["brand_wikidata"]
+                case "misc":
+                    if item["name"].startswith("7-Eleven "):
+                        item["located_in"] = SEVEN_ELEVEN_SHARED_ATTRIBUTES["brand"]
+                        item["located_in_wikidata"] = SEVEN_ELEVEN_SHARED_ATTRIBUTES["brand_wikidata"]
+                    elif item["name"].startswith("AMPM "):
+                        item["located_in"] = "ampm"
+                        item["located_in_wikidata"] = "Q306960"
+                    elif item["name"].startswith("Atlas Fuels "):
+                        item["located_in"] = "Atlas Fuels"
+                    elif item["name"].startswith("Boost Fuels "):
+                        item["located_in"] = "Boost Fuels"
+                    elif item["name"].startswith("Dayef Petroleum "):
+                        item["located_in"] = "Dayef Petroleum"
+                    elif item["name"].startswith("Mobil "):
+                        item["located_in"] = ExxonMobilSpider.brands["Mobil"]["brand"]
+                        item["located_in_wikidata"] = ExxonMobilSpider.brands["Mobil"]["brand_wikidata"]
+                    elif item["name"].startswith("Night Owl "):
+                        item["located_in"] = NightOwlAU.item_attributes["brand"]
+                        item["located_in_wikidata"] = NightOwlAU.item_attributes["brand_wikidata"]
+                    elif item["name"].startswith("Octane Fuels "):
+                        item["located_in"] = "Octane Fuels"
+                    elif item["name"].startswith("Pearl Energy "):
+                        item["located_in"] = "Pearl Energy"
+                    elif item["name"].startswith("Quik Stop "):
+                        item["located_in"] = "Quik Stop"
+                        item["located_in_wikidata"] = "Q105141709"
+                    elif item["name"].startswith("Reddy Express "):
+                        item["located_in"] = "Reddy Express"
+                    elif item["name"].startswith("S24 "):
+                        item["located_in"] = "S24"
+                    else:
+                        self.logger.warning(
+                            "Unknown brand detected for the feature this Move Yourself is located within. Full location name is: {}".format(
+                                location["deponame"]
+                            )
+                        )
+                case _:
+                    self.logger.warning(
+                        "Unknown brand detected for the feature this Move Yourself is located within: {}".format(
+                            location["depotype"]
+                        )
+                    )
+            yield item


Test patch: