Skip to content

OR selectors together #1

@amccloud

Description

@amccloud

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions