We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
enterprise car hire spider missing ~6k outlets
In the latest run of the enterprise.py spider from 2023-05-15, there are around 6000 fewer results than in the previous run from 2023-04-15.

I think the cause is that the search API that ATP uses is no longer returning results for some major countries. For example, the following still work:
* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/IT
* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/BE
* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/MX

but the following do not:
* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/GB
* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/US
* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/FR

I'm not sure why the API has stopped returning for certain countries, or if there's anything we can do about it.

If we want to look at alternative means, then it's possible that the "Airport Locations" and "Neighbourhood Locations" lists at https://www.enterprise.co.uk/en/car-hire/locations/uk.html are complete for GB. (Together they have 427 locations, compared with the 425 I extracted for my Chain Reaction tool from a previous ATP dataset.) But then you'd need to parse each branch page, and that's a lot more HTTP fetches. I haven't looked what other localised sites do in terms of location lists.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `locations/spiders/enterprise.py`
Content:
```
1 import geonamescache
2 from scrapy import Spider
3 from scrapy.http import JsonRequest
4 
5 from locations.dict_parser import DictParser
6 
7 
8 class EnterpriseSpider(Spider):
9     name = "enterprise"
10     item_attributes = {"brand": "Enterprise Rent-A-Car", "brand_wikidata": "Q17085454"}
11     allowed_domains = ["prd.location.enterprise.com"]
12 
13     def start_requests(self):
14         gc = geonamescache.GeonamesCache()
15         countries = gc.get_countries()
16         for country_code in countries.keys():
17             yield JsonRequest(
18                 url=f"https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}"
19             )
20 
21     def parse(self, response):
22         for location in response.json():
23             if location["closed"] or not location["physicalLocation"]:
24                 continue
25             item = DictParser.parse(location)
26             item["ref"] = location["stationId"]
27             item["name"] = location["locationNameTranslation"]
28             item["street_address"] = ", ".join(filter(None, location["addressLines"]))
29             item["phone"] = location["formattedPhone"]
30             yield item
31
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/locations/spiders/enterprise.py b/locations/spiders/enterprise.py
--- a/locations/spiders/enterprise.py
+++ b/locations/spiders/enterprise.py
@@ -8,15 +8,20 @@
 class EnterpriseSpider(Spider):
     name = "enterprise"
     item_attributes = {"brand": "Enterprise Rent-A-Car", "brand_wikidata": "Q17085454"}
-    allowed_domains = ["prd.location.enterprise.com"]
+    allowed_domains = ["prd.location.enterprise.com", "int1.location.enterprise.com"]
 
     def start_requests(self):
         gc = geonamescache.GeonamesCache()
         countries = gc.get_countries()
         for country_code in countries.keys():
-            yield JsonRequest(
-                url=f"https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}"
-            )
+            # It appears that countries are sharded between two
+            # servers. Other servers are int2, xqa1, xqa2, xqa3
+            # but search of these servers reveals no additional
+            # locations on top of just prd and int1.
+            for subdomain in ["prd", "int1"]:
+                yield JsonRequest(
+                    url=f"https://{subdomain}.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}"
+                )
 
     def parse(self, response):
         for location in response.json():

{"golden_diff": "diff --git a/locations/spiders/enterprise.py b/locations/spiders/enterprise.py\n--- a/locations/spiders/enterprise.py\n+++ b/locations/spiders/enterprise.py\n@@ -8,15 +8,20 @@\n class EnterpriseSpider(Spider):\n     name = \"enterprise\"\n     item_attributes = {\"brand\": \"Enterprise Rent-A-Car\", \"brand_wikidata\": \"Q17085454\"}\n-    allowed_domains = [\"prd.location.enterprise.com\"]\n+    allowed_domains = [\"prd.location.enterprise.com\", \"int1.location.enterprise.com\"]\n \n     def start_requests(self):\n         gc = geonamescache.GeonamesCache()\n         countries = gc.get_countries()\n         for country_code in countries.keys():\n-            yield JsonRequest(\n-                url=f\"https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}\"\n-            )\n+            # It appears that countries are sharded between two\n+            # servers. Other servers are int2, xqa1, xqa2, xqa3\n+            # but search of these servers reveals no additional\n+            # locations on top of just prd and int1.\n+            for subdomain in [\"prd\", \"int1\"]:\n+                yield JsonRequest(\n+                    url=f\"https://{subdomain}.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}\"\n+                )\n \n     def parse(self, response):\n         for location in response.json():\n", "issue": "enterprise car hire spider missing ~6k outlets\nIn the latest run of the enterprise.py spider from 2023-05-15, there are around 6000 fewer results than in the previous run from 2023-04-15.\r\n\r\nI think the cause is that the search API that ATP uses is no longer returning results for some major countries. For example, the following still work:\r\n* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/IT\r\n* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/BE\r\n* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/MX\r\n\r\nbut the following do not:\r\n* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/GB\r\n* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/US\r\n* https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/FR\r\n\r\nI'm not sure why the API has stopped returning for certain countries, or if there's anything we can do about it.\r\n\r\nIf we want to look at alternative means, then it's possible that the \"Airport Locations\" and \"Neighbourhood Locations\" lists at https://www.enterprise.co.uk/en/car-hire/locations/uk.html are complete for GB. (Together they have 427 locations, compared with the 425 I extracted for my Chain Reaction tool from a previous ATP dataset.) But then you'd need to parse each branch page, and that's a lot more HTTP fetches. I haven't looked what other localised sites do in terms of location lists.\n", "before_files": [{"content": "import geonamescache\nfrom scrapy import Spider\nfrom scrapy.http import JsonRequest\n\nfrom locations.dict_parser import DictParser\n\n\nclass EnterpriseSpider(Spider):\n    name = \"enterprise\"\n    item_attributes = {\"brand\": \"Enterprise Rent-A-Car\", \"brand_wikidata\": \"Q17085454\"}\n    allowed_domains = [\"prd.location.enterprise.com\"]\n\n    def start_requests(self):\n        gc = geonamescache.GeonamesCache()\n        countries = gc.get_countries()\n        for country_code in countries.keys():\n            yield JsonRequest(\n                url=f\"https://prd.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}\"\n            )\n\n    def parse(self, response):\n        for location in response.json():\n            if location[\"closed\"] or not location[\"physicalLocation\"]:\n                continue\n            item = DictParser.parse(location)\n            item[\"ref\"] = location[\"stationId\"]\n            item[\"name\"] = location[\"locationNameTranslation\"]\n            item[\"street_address\"] = \", \".join(filter(None, location[\"addressLines\"]))\n            item[\"phone\"] = location[\"formattedPhone\"]\n            yield item\n", "path": "locations/spiders/enterprise.py"}], "after_files": [{"content": "import geonamescache\nfrom scrapy import Spider\nfrom scrapy.http import JsonRequest\n\nfrom locations.dict_parser import DictParser\n\n\nclass EnterpriseSpider(Spider):\n    name = \"enterprise\"\n    item_attributes = {\"brand\": \"Enterprise Rent-A-Car\", \"brand_wikidata\": \"Q17085454\"}\n    allowed_domains = [\"prd.location.enterprise.com\", \"int1.location.enterprise.com\"]\n\n    def start_requests(self):\n        gc = geonamescache.GeonamesCache()\n        countries = gc.get_countries()\n        for country_code in countries.keys():\n            # It appears that countries are sharded between two\n            # servers. Other servers are int2, xqa1, xqa2, xqa3\n            # but search of these servers reveals no additional\n            # locations on top of just prd and int1.\n            for subdomain in [\"prd\", \"int1\"]:\n                yield JsonRequest(\n                    url=f\"https://{subdomain}.location.enterprise.com/enterprise-sls/search/location/enterprise/web/country/{country_code}\"\n                )\n\n    def parse(self, response):\n        for location in response.json():\n            if location[\"closed\"] or not location[\"physicalLocation\"]:\n                continue\n            item = DictParser.parse(location)\n            item[\"ref\"] = location[\"stationId\"]\n            item[\"name\"] = location[\"locationNameTranslation\"]\n            item[\"street_address\"] = \", \".join(filter(None, location[\"addressLines\"]))\n            item[\"phone\"] = location[\"formattedPhone\"]\n            yield item\n", "path": "locations/spiders/enterprise.py"}]}