prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Problems with Spiders built on YextSpider
  I've noticed a few of the spiders whose results I was using in my OSM tool have recently stopped returning any results, including five_guys_de_es_fr_gb.py , matalan_gb.py , and three_gb.py .
  
  A common feature of these spiders is that they use the YextSpider class. Checking some other spiders that are also based on this class, reveals they've also stopped working. The spider stats suggest 404 and 403 errors are preventing the data being retrieved.
  
  If this is a general problem affecting multiple spiders, would someone be able to take a look and see if it can be fixed?
  
  --- 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/independent_financial_us.py`
  Content:
  ```
  1 from locations.categories import Categories, apply_category
  2 from locations.storefinders.yext import YextSpider
  3 
  4 
  5 class IndependentFinancialUSSpider(YextSpider):
  6     name = "independent_financial_us"
  7     item_attributes = {"brand": "Independent Financial", "brand_wikidata": "Q6016398"}
  8     api_key = "ee4600854cf5501c53831bf944472e57"
  9     wanted_types = ["location", "atm"]
  10 
  11     def parse_item(self, item, location):
  12         if location["meta"]["entityType"] == "location":
  13             apply_category(Categories.BANK, item)
  14             item["ref"] = location.get("c_branchCode", location["meta"].get("id"))
  15             item["name"] = " ".join(filter(None, [location.get("name"), location.get("geomodifier")]))
  16         elif location["meta"]["entityType"] == "atm":
  17             apply_category(Categories.ATM, item)
  18             item["name"] = location.get("geomodifier")
  19         item["website"] = location.get("c_pagesURL")
  20         item.pop("email", None)
  21         item["extras"].pop("contact:instagram", None)
  22         item.pop("twitter", None)
  23         item.pop("facebook", None)
  24         yield item
  25
  ```
  --- 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/independent_financial_us.py b/locations/spiders/independent_financial_us.py
  --- a/locations/spiders/independent_financial_us.py
  +++ b/locations/spiders/independent_financial_us.py
  @@ -1,24 +1,18 @@
   from locations.categories import Categories, apply_category
  -from locations.storefinders.yext import YextSpider
  +from locations.storefinders.yext_answers import YextAnswersSpider
   
   
  -class IndependentFinancialUSSpider(YextSpider):
  +class IndependentFinancialUSSpider(YextAnswersSpider):
       name = "independent_financial_us"
       item_attributes = {"brand": "Independent Financial", "brand_wikidata": "Q6016398"}
       api_key = "ee4600854cf5501c53831bf944472e57"
  -    wanted_types = ["location", "atm"]
  +    experience_key = "independent-financial-search"
   
  -    def parse_item(self, item, location):
  -        if location["meta"]["entityType"] == "location":
  -            apply_category(Categories.BANK, item)
  -            item["ref"] = location.get("c_branchCode", location["meta"].get("id"))
  -            item["name"] = " ".join(filter(None, [location.get("name"), location.get("geomodifier")]))
  -        elif location["meta"]["entityType"] == "atm":
  +    def parse_item(self, location, item):
  +        if location["data"]["type"] == "atm":
               apply_category(Categories.ATM, item)
  -            item["name"] = location.get("geomodifier")
  -        item["website"] = location.get("c_pagesURL")
  -        item.pop("email", None)
  -        item["extras"].pop("contact:instagram", None)
  -        item.pop("twitter", None)
  -        item.pop("facebook", None)
  +        elif location["data"]["type"] == "location":
  +            apply_category(Categories.BANK, item)
  +        else:
  +            self.logger.error("Unknown location type: {}".format(location["data"]["type"]))
           yield item
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/independent_financial_us.py b/locations/spiders/independent_financial_us.py\n--- a/locations/spiders/independent_financial_us.py\n+++ b/locations/spiders/independent_financial_us.py\n@@ -1,24 +1,18 @@\n from locations.categories import Categories, apply_category\n-from locations.storefinders.yext import YextSpider\n+from locations.storefinders.yext_answers import YextAnswersSpider\n \n \n-class IndependentFinancialUSSpider(YextSpider):\n+class IndependentFinancialUSSpider(YextAnswersSpider):\n     name = \"independent_financial_us\"\n     item_attributes = {\"brand\": \"Independent Financial\", \"brand_wikidata\": \"Q6016398\"}\n     api_key = \"ee4600854cf5501c53831bf944472e57\"\n-    wanted_types = [\"location\", \"atm\"]\n+    experience_key = \"independent-financial-search\"\n \n-    def parse_item(self, item, location):\n-        if location[\"meta\"][\"entityType\"] == \"location\":\n-            apply_category(Categories.BANK, item)\n-            item[\"ref\"] = location.get(\"c_branchCode\", location[\"meta\"].get(\"id\"))\n-            item[\"name\"] = \" \".join(filter(None, [location.get(\"name\"), location.get(\"geomodifier\")]))\n-        elif location[\"meta\"][\"entityType\"] == \"atm\":\n+    def parse_item(self, location, item):\n+        if location[\"data\"][\"type\"] == \"atm\":\n             apply_category(Categories.ATM, item)\n-            item[\"name\"] = location.get(\"geomodifier\")\n-        item[\"website\"] = location.get(\"c_pagesURL\")\n-        item.pop(\"email\", None)\n-        item[\"extras\"].pop(\"contact:instagram\", None)\n-        item.pop(\"twitter\", None)\n-        item.pop(\"facebook\", None)\n+        elif location[\"data\"][\"type\"] == \"location\":\n+            apply_category(Categories.BANK, item)\n+        else:\n+            self.logger.error(\"Unknown location type: {}\".format(location[\"data\"][\"type\"]))\n         yield item\n", "issue": "Problems with Spiders built on YextSpider\nI've noticed a few of the spiders whose results I was using in my OSM tool have recently stopped returning any results, including five_guys_de_es_fr_gb.py , matalan_gb.py , and three_gb.py .\r\n\r\nA common feature of these spiders is that they use the YextSpider class. Checking some other spiders that are also based on this class, reveals they've also stopped working. The spider stats suggest 404 and 403 errors are preventing the data being retrieved.\r\n\r\nIf this is a general problem affecting multiple spiders, would someone be able to take a look and see if it can be fixed?\n", "before_files": [{"content": "from locations.categories import Categories, apply_category\nfrom locations.storefinders.yext import YextSpider\n\n\nclass IndependentFinancialUSSpider(YextSpider):\n    name = \"independent_financial_us\"\n    item_attributes = {\"brand\": \"Independent Financial\", \"brand_wikidata\": \"Q6016398\"}\n    api_key = \"ee4600854cf5501c53831bf944472e57\"\n    wanted_types = [\"location\", \"atm\"]\n\n    def parse_item(self, item, location):\n        if location[\"meta\"][\"entityType\"] == \"location\":\n            apply_category(Categories.BANK, item)\n            item[\"ref\"] = location.get(\"c_branchCode\", location[\"meta\"].get(\"id\"))\n            item[\"name\"] = \" \".join(filter(None, [location.get(\"name\"), location.get(\"geomodifier\")]))\n        elif location[\"meta\"][\"entityType\"] == \"atm\":\n            apply_category(Categories.ATM, item)\n            item[\"name\"] = location.get(\"geomodifier\")\n        item[\"website\"] = location.get(\"c_pagesURL\")\n        item.pop(\"email\", None)\n        item[\"extras\"].pop(\"contact:instagram\", None)\n        item.pop(\"twitter\", None)\n        item.pop(\"facebook\", None)\n        yield item\n", "path": "locations/spiders/independent_financial_us.py"}], "after_files": [{"content": "from locations.categories import Categories, apply_category\nfrom locations.storefinders.yext_answers import YextAnswersSpider\n\n\nclass IndependentFinancialUSSpider(YextAnswersSpider):\n    name = \"independent_financial_us\"\n    item_attributes = {\"brand\": \"Independent Financial\", \"brand_wikidata\": \"Q6016398\"}\n    api_key = \"ee4600854cf5501c53831bf944472e57\"\n    experience_key = \"independent-financial-search\"\n\n    def parse_item(self, location, item):\n        if location[\"data\"][\"type\"] == \"atm\":\n            apply_category(Categories.ATM, item)\n        elif location[\"data\"][\"type\"] == \"location\":\n            apply_category(Categories.BANK, item)\n        else:\n            self.logger.error(\"Unknown location type: {}\".format(location[\"data\"][\"type\"]))\n        yield item\n", "path": "locations/spiders/independent_financial_us.py"}]}