You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{'json-ld': [{'@context': 'https://schema.org','@type': 'ProductGroup','description': 'Fail-safe magnetic lock for inswing and outswing ''doors that connects to a UniFi Access Hub.','hasVariant': [{'@type': 'Product','brand': {'@type': 'Brand','name': 'Ubiquiti'},'description': 'Fail-safe magnetic lock for ''inswing and outswing doors that ''connects to a UniFi Access Hub.','image': {'@type': 'ImageObject','height': '1500','url': 'https://cdn.ecomm.ui.com/products/a391617a-790e-4e6a-ab24-c9b63e0e0787/2c728090-bf62-4466-ba76-9e83c9bacfa6.png','width': '1500'},'name': 'Access Magnetic Lock / Holds up to 270 ''kg (600 lb)','offers': {'@type': 'Offer','availability': 'https://schema.org/OutOfStock','priceSpecification': {'@type': 'PriceSpecification','price': 199,'priceCurrency': 'CAD','valueAddedTaxIncluded': False}},'sku': 'UA-Lock-Magnetic-270kg','url': 'https://ca.store.ui.com/ca/en/products/ua-lock-magnetic?variant=ua-lock-magnetic-270kg'},{'@type': 'Product','brand': {'@type': 'Brand','name': 'Ubiquiti'},'description': 'Fail-safe magnetic lock for ''inswing and outswing doors that ''connects to a UniFi Access Hub.','image': {'@type': 'ImageObject','height': '1500','url': 'https://cdn.ecomm.ui.com/products/a391617a-790e-4e6a-ab24-c9b63e0e0787/458d123f-48fa-4e75-9f79-0b8ea3bdab33.png','width': '1500'},'name': 'Access Magnetic Lock / Holds up to 540 ''kg (1200 lb)','offers': {'@type': 'Offer','availability': 'https://schema.org/OutOfStock','priceSpecification': {'@type': 'PriceSpecification','price': 269,'priceCurrency': 'CAD','valueAddedTaxIncluded': False}},'sku': 'UA-Lock-Magnetic-540kg','url': 'https://ca.store.ui.com/ca/en/products/ua-lock-magnetic?variant=ua-lock-magnetic-540kg'}],'image': {'@type': 'ImageObject','height': '1500','url': 'https://cdn.ecomm.ui.com/products/a391617a-790e-4e6a-ab24-c9b63e0e0787/2c728090-bf62-4466-ba76-9e83c9bacfa6.png','width': '1500'},'name': 'Access Magnetic Lock','url': 'https://ca.store.ui.com/ca/en/products/ua-lock-magnetic'}],'microdata': [],'opengraph': [{'namespace': {'og': 'http://ogp.me/ns#'},'properties': [('og:site_name','Ubiquiti Store '),('og:url','https://ca.store.ui.com/ca/en/products/ua-lock-magnetic'),('og:title','Access Magnetic Lock - Ubiquiti Store '),('og:description','Fail-safe magnetic lock for inswing and ''outswing doors that connects to a UniFi ''Access Hub.'),('og:type','website'),('og:image','https://cdn.ecomm.ui.com/products/a391617a-790e-4e6a-ab24-c9b63e0e0787/2c728090-bf62-4466-ba76-9e83c9bacfa6.png'),('og:image:width','1500'),('og:image:height','1500')]}],'rdfa': [{'@id': 'https://ca.store.ui.com/ca/en/category/door-access-accessories/products/ua-lock-magnetic?variant=ua-lock-magnetic-270kg','http://ogp.me/ns#description': [{'@value': 'Fail-safe magnetic ''lock for inswing and ''outswing doors that ''connects to a UniFi ''Access Hub.'}],'http://ogp.me/ns#image': [{'@value': 'https://cdn.ecomm.ui.com/products/a391617a-790e-4e6a-ab24-c9b63e0e0787/2c728090-bf62-4466-ba76-9e83c9bacfa6.png'}],'http://ogp.me/ns#image:height': [{'@value': '1500'}],'http://ogp.me/ns#image:width': [{'@value': '1500'}],'http://ogp.me/ns#site_name': [{'@value': 'Ubiquiti Store '}],'http://ogp.me/ns#title': [{'@value': 'Access Magnetic Lock - ''Ubiquiti Store '}],'http://ogp.me/ns#type': [{'@value': 'website'}],'http://ogp.me/ns#url': [{'@value': 'https://ca.store.ui.com/ca/en/products/ua-lock-magnetic'}]}]}
Both variants were picked up (even though the page structure is identical!), and with two prices, the whole processor errors out.
Since the exact mechanations of extruct is outside the scope of changedetection.io, I believe it would be more correct to log a warning and just use the first price.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It looks like, sometimes extruct adds product variants to the metadata, and sometimes it doesn't. Here's a page with multiple, differently-priced variants: https://ca.store.ui.com/ca/en/category/cloud-gateways-compact/collections/cloud-gateway-fiber/products/ucg-fiber?variant=uacc-ssd-1tb
and here's the extruct extract:
Notice the variants didn't get picked up. Now let's look at https://ca.store.ui.com/ca/en/category/door-access-accessories/products/ua-lock-magnetic?variant=ua-lock-magnetic-270kg
Both variants were picked up (even though the page structure is identical!), and with two prices, the whole processor errors out.
changedetection.io/changedetectionio/processors/restock_diff/processor.py
Line 95 in f57bc10
Since the exact mechanations of extruct is outside the scope of changedetection.io, I believe it would be more correct to log a warning and just use the first price.
Beta Was this translation helpful? Give feedback.
All reactions