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

Questions and answers about anything related to Helium Scraper
Post Reply
yeti
Posts: 9
Joined: Sat Feb 02, 2013 1:01 am

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

Post by yeti » Sun Aug 31, 2014 11:36 am

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!

mehdi
Posts: 8
Joined: Tue Aug 26, 2014 11:56 am

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

Post by mehdi » Mon Sep 15, 2014 3:25 pm

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 ?

webmaster
Site Admin
Posts: 501
Joined: Mon Dec 06, 2010 8:39 am
Contact:

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

Post by webmaster » Tue Jan 06, 2015 7:24 am

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.
Juan Soldi
The Helium Scraper Team

Post Reply