Repository: alltheplaces/alltheplaces

Issue:
Spider rubios is broken
During the global build at 2021-05-26-14-42-23, spider **rubios** failed with **0 features** and **0 errors**.

Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/rubios.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/rubios.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/rubios.geojson))


Discussion:

Resolving patch:
diff --git a/locations/spiders/rubios.py b/locations/spiders/rubios.py
--- a/locations/spiders/rubios.py
+++ b/locations/spiders/rubios.py
@@ -16,7 +16,7 @@ class RubiosSpider(scrapy.Spider):
     def parse(self, response):
         response.selector.remove_namespaces()
         city_urls = response.xpath('//url/loc/text()').extract()
-        regex = re.compile(r'http\S+rubios.com/store-locations/\S+/\S+/\S+')
+        regex = re.compile(r'http\S+rubios.com/restaurant-locations/\S+/\S+/\S+')
         for path in city_urls:
             if re.search(regex, path):
                 yield scrapy.Request(
@@ -27,17 +27,18 @@ def parse(self, response):
     def parse_store(self, response):
 
         properties = {
-            'name': response.xpath('//span[@itemprop="name"]/text()').extract_first(),
-            'ref': response.xpath('//span[@itemprop="name"]/text()').extract_first(),
-            'addr_full': response.xpath('//span[@itemprop="streetAddress"]/text()').extract_first(),
-            'city': response.xpath('//span[@itemprop="addressLocality"]/text()').extract_first(),
-            'state': response.xpath('//span[@itemprop="addressRegion"]/text()').extract_first(),
-            'postcode': response.xpath('//span[@itemprop="postalCode"]/text()').extract_first(),
-            'phone': response.xpath('//span[@itemprop="telephone"]/a/text()').extract_first(),
+            'name': response.xpath('//meta[@property="og:title"]/@content').extract_first(),
+            'ref': response.url,
+            'addr_full': response.xpath('//meta[@property="og:street_address"]/@content').extract_first(),
+            'city': response.xpath('//meta[@property="og:locality"]/@content').extract_first(),
+            'state': response.xpath('//meta[@property="og:region"]/@content').extract_first(),
+            'postcode': response.xpath('//meta[@property="og:postal_code"]/@content').extract_first(),
+            'country': response.xpath('//meta[@property="og:country_name"]/@content').extract_first(),
+            'phone': response.xpath('//@href[contains(.,"tel:")]').extract_first().replace('tel:', ''),
             'website': response.url,
-            'opening_hours': "".join(response.xpath('//div/div/div/span/span/span/text()').extract()).strip(),
-            'lon': float(response.xpath('//head/script[9]').extract_first().split('"coordinates":[')[1].split(']')[0].split(',')[0]),
-            'lat': float(response.xpath('//head/script[9]').extract_first().split('"coordinates":[')[1].split(']')[0].split(',')[1]),
+            'opening_hours': ''.join(response.css('.oh-wrapper ::text').extract()),
+            'lon': response.xpath('//meta[@property="og:longitude"]/@content').extract_first(),
+            'lat': response.xpath('//meta[@property="og:latitude"]/@content').extract_first(),
         }
 
         yield GeojsonPointItem(**properties)


Test patch: