prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  McDonald's
  JSON endpoint: http://rl.mcdonalds.com/googleapps/GoogleSearchUSAction.do?method=searchLocation&searchTxtLatlng=(43.1272254%2C-87.9432837)&actionType=searchRestaurant&language=en&country=us
  
  Search by lat/lon only? Looks like they geocode using Google Maps API and then call this endpoint with a lat/lon.
  
  
  --- 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/mcdonalds_localizer.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 import json
  4 from locations.items import GeojsonPointItem
  5 
  6 
  7 class McLocalizer(scrapy.Spider):
  8 
  9     name = "mclocalizer"
  10     allowed_domains = ["www.mcdonalds.com", "www.mcdonalds.com.pr", "www.mcdonalds.co.cr", "www.mcdonalds.com.ar"]
  11     start_urls = (
  12         'http://www.mcdonalds.com.pr/api/restaurantsByCountry?country=PR',
  13         'http://www.mcdonalds.co.cr/api/restaurantsByCountry?country=CR',
  14         'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR'
  15     )
  16 
  17     def parse(self, response):
  18         data = response.body_as_unicode()
  19         data.replace('" ', '"')
  20         data.replace(' "', '"')
  21         results = json.loads(data)
  22         results = results["content"]["restaurants"]
  23         for data in results:
  24             properties = {
  25                 'ref': data['id'],
  26                 'lon': float(data['longitude']),
  27                 'lat': float(data['latitude']),
  28                 
  29             }
  30 
  31             contact_info = data['name'][:data['name'].find("<br")]
  32             name = contact_info[:contact_info.find("</br")]
  33 
  34             properties["name"] = name
  35             properties["addr_full"] = data['name'][data['name'].find("<small>"):-8][8:]
  36             #  = address[8:]
  37 
  38             yield GeojsonPointItem(**properties)
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/locations/spiders/mcdonalds_localizer.py b/locations/spiders/mcdonalds_localizer.py
  --- a/locations/spiders/mcdonalds_localizer.py
  +++ b/locations/spiders/mcdonalds_localizer.py
  @@ -7,11 +7,12 @@
   class McLocalizer(scrapy.Spider):
   
       name = "mclocalizer"
  -    allowed_domains = ["www.mcdonalds.com", "www.mcdonalds.com.pr", "www.mcdonalds.co.cr", "www.mcdonalds.com.ar"]
  +    allowed_domains = ["www.mcdonalds.com", "www.mcdonalds.com.pr", "www.mcdonalds.co.cr", "www.mcdonalds.com.ar", "www.mcdonalds.com.pa"]
       start_urls = (
           'http://www.mcdonalds.com.pr/api/restaurantsByCountry?country=PR',
           'http://www.mcdonalds.co.cr/api/restaurantsByCountry?country=CR',
  -        'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR'
  +        'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR',
  +        'http://www.mcdonalds.com.pa/api/restaurantsByCountry?country=PA'
       )
   
       def parse(self, response):
  @@ -33,6 +34,5 @@
   
               properties["name"] = name
               properties["addr_full"] = data['name'][data['name'].find("<small>"):-8][8:]
  -            #  = address[8:]
   
               yield GeojsonPointItem(**properties)
  \ No newline at end of file
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/mcdonalds_localizer.py b/locations/spiders/mcdonalds_localizer.py\n--- a/locations/spiders/mcdonalds_localizer.py\n+++ b/locations/spiders/mcdonalds_localizer.py\n@@ -7,11 +7,12 @@\n class McLocalizer(scrapy.Spider):\n \n     name = \"mclocalizer\"\n-    allowed_domains = [\"www.mcdonalds.com\", \"www.mcdonalds.com.pr\", \"www.mcdonalds.co.cr\", \"www.mcdonalds.com.ar\"]\n+    allowed_domains = [\"www.mcdonalds.com\", \"www.mcdonalds.com.pr\", \"www.mcdonalds.co.cr\", \"www.mcdonalds.com.ar\", \"www.mcdonalds.com.pa\"]\n     start_urls = (\n         'http://www.mcdonalds.com.pr/api/restaurantsByCountry?country=PR',\n         'http://www.mcdonalds.co.cr/api/restaurantsByCountry?country=CR',\n-        'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR'\n+        'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR',\n+        'http://www.mcdonalds.com.pa/api/restaurantsByCountry?country=PA'\n     )\n \n     def parse(self, response):\n@@ -33,6 +34,5 @@\n \n             properties[\"name\"] = name\n             properties[\"addr_full\"] = data['name'][data['name'].find(\"<small>\"):-8][8:]\n-            #  = address[8:]\n \n             yield GeojsonPointItem(**properties)\n\\ No newline at end of file\n", "issue": "McDonald's\nJSON endpoint: http://rl.mcdonalds.com/googleapps/GoogleSearchUSAction.do?method=searchLocation&searchTxtLatlng=(43.1272254%2C-87.9432837)&actionType=searchRestaurant&language=en&country=us\n\nSearch by lat/lon only? Looks like they geocode using Google Maps API and then call this endpoint with a lat/lon.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nfrom locations.items import GeojsonPointItem\n\n\nclass McLocalizer(scrapy.Spider):\n\n    name = \"mclocalizer\"\n    allowed_domains = [\"www.mcdonalds.com\", \"www.mcdonalds.com.pr\", \"www.mcdonalds.co.cr\", \"www.mcdonalds.com.ar\"]\n    start_urls = (\n        'http://www.mcdonalds.com.pr/api/restaurantsByCountry?country=PR',\n        'http://www.mcdonalds.co.cr/api/restaurantsByCountry?country=CR',\n        'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR'\n    )\n\n    def parse(self, response):\n        data = response.body_as_unicode()\n        data.replace('\" ', '\"')\n        data.replace(' \"', '\"')\n        results = json.loads(data)\n        results = results[\"content\"][\"restaurants\"]\n        for data in results:\n            properties = {\n                'ref': data['id'],\n                'lon': float(data['longitude']),\n                'lat': float(data['latitude']),\n                \n            }\n\n            contact_info = data['name'][:data['name'].find(\"<br\")]\n            name = contact_info[:contact_info.find(\"</br\")]\n\n            properties[\"name\"] = name\n            properties[\"addr_full\"] = data['name'][data['name'].find(\"<small>\"):-8][8:]\n            #  = address[8:]\n\n            yield GeojsonPointItem(**properties)", "path": "locations/spiders/mcdonalds_localizer.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nfrom locations.items import GeojsonPointItem\n\n\nclass McLocalizer(scrapy.Spider):\n\n    name = \"mclocalizer\"\n    allowed_domains = [\"www.mcdonalds.com\", \"www.mcdonalds.com.pr\", \"www.mcdonalds.co.cr\", \"www.mcdonalds.com.ar\", \"www.mcdonalds.com.pa\"]\n    start_urls = (\n        'http://www.mcdonalds.com.pr/api/restaurantsByCountry?country=PR',\n        'http://www.mcdonalds.co.cr/api/restaurantsByCountry?country=CR',\n        'http://www.mcdonalds.com.ar/api/restaurantsByCountry?country=AR',\n        'http://www.mcdonalds.com.pa/api/restaurantsByCountry?country=PA'\n    )\n\n    def parse(self, response):\n        data = response.body_as_unicode()\n        data.replace('\" ', '\"')\n        data.replace(' \"', '\"')\n        results = json.loads(data)\n        results = results[\"content\"][\"restaurants\"]\n        for data in results:\n            properties = {\n                'ref': data['id'],\n                'lon': float(data['longitude']),\n                'lat': float(data['latitude']),\n                \n            }\n\n            contact_info = data['name'][:data['name'].find(\"<br\")]\n            name = contact_info[:contact_info.find(\"</br\")]\n\n            properties[\"name\"] = name\n            properties[\"addr_full\"] = data['name'][data['name'].find(\"<small>\"):-8][8:]\n\n            yield GeojsonPointItem(**properties)", "path": "locations/spiders/mcdonalds_localizer.py"}]}