One of the features that I wanted to suggest is some sort of logical OR operator.
For example,
http://www.bestbuy.com/site/Swiss+Gear+-+SHERPA+Laptop+Sleeve+-+Black/Blue/8819264.p?skuId=8819264&id=1206750211247
I want the price. I'd like to have the sale price and if none is provided the original price. I've tried 3 diff ways to achieve this. The first, which I believe would probably be the best syntax for this to be implemented, comma delimited selectors.
{ "price": "#productpreview .salenum, #productpreview .pricenum" }
Then I tried
{ "price?": "#productpreview .salenum", "price": "#productpreview .pricenum" }
finally because my crawling software (Scrapy) takes the first object from the list
{ "price": ["#productpreview .salenum, #productpreview .pricenum"] }
... but order is not preserved so that isn't reliable. If order was preserved this would be my second choice.
Any thoughts? or has this already been implemented?
Andrew
One of the features that I wanted to suggest is some sort of logical OR operator.
For example,
http://www.bestbuy.com/site/Swiss+Gear+-+SHERPA+Laptop+Sleeve+-+Black/Blue/8819264.p?skuId=8819264&id=1206750211247
I want the price. I'd like to have the sale price and if none is provided the original price. I've tried 3 diff ways to achieve this. The first, which I believe would probably be the best syntax for this to be implemented, comma delimited selectors.
{ "price": "#productpreview .salenum, #productpreview .pricenum" }Then I tried
{ "price?": "#productpreview .salenum", "price": "#productpreview .pricenum" }finally because my crawling software (Scrapy) takes the first object from the list
{ "price": ["#productpreview .salenum, #productpreview .pricenum"] }... but order is not preserved so that isn't reliable. If order was preserved this would be my second choice.
Any thoughts? or has this already been implemented?
Andrew