prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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?
  
  </issue>
  <code>
  [start of locations/spiders/independent_financial_us.py]
  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 of locations/spiders/independent_financial_us.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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"}]}