Page 1 of 1

Extracting data based on it being one of only 2 classes??

Posted: Sun Aug 31, 2014 11:36 am
by yeti
Hi folks,

I'm running a fairly simple project which extracts prices.

Usually the basic price is shown and extracted no problem.

However occasionally, the item is in a sale, so instead of just the price being displayed, it shows:

Was £3.00
Now £2.00
Save £1.00

The class of the regular (non sale item) price on its own is 'ProdPrice'

The class of the 'sale item' prices are: 'ProdPriceWas' ProdPriceNow' and 'ProdPriceSave'.

Is it possible to tell the scraper to look for EITHER 'ProdPrice' OR 'ProdPriceNow'? but nothing else?

Currently it either selects the regular price (if no sale) fine, but then when the price is in a sale, it selects all 3 of the prices (Was, Now and Save) and takes the last one (Save £1.00) which is the incorrect price.

Thanks for any help!

Re: Extracting data based on it being one of only 2 classes?

Posted: Mon Sep 15, 2014 3:25 pm
by mehdi
I guess using a text gatherer / javascript gatherer would solve your problem, it should be based on ProdPrice.* regex
Not sure how to acheive though, sorry. Can you send a URL so I can check ?

Re: Extracting data based on it being one of only 2 classes?

Posted: Tue Jan 06, 2015 7:24 am
by webmaster
You could use the Set Kind feature to achieve this (the little Venn diagram on top of the kinds editor) by using two kinds and creating one that is the Union of these kinds.