1. Before anything else, try creating a kind that selects only the sale price and another kind that selects the price when there is only one price. Then you can use a set kind (with the
Create Set Kind button on top) that is the union of these two kinds. If any of these kinds start selecting more elements than you need, you can try going to
Project -> Options -> Select Property Gatherers and then selecting all gatherers under the
Kind Defining tab, and then creating your kinds again. If this still doesn't work you'll need some javascript. Perhaps you could try creating a kind that selects the whole price box (just click on any price and click on the
Select Parent button until you see "<div class="price-box">"), and then adding a javascript gatherer at
Project -> JavaScript Gatherers with something like this:
Code: Select all
return element.children[1].innerText;
And then use your gatherer instead of
innerText on your
Extract action.
2. You might want to take a look at the
Select each item in a list premade project at
File -> Online Premades. You'll need to import this action and then run it from a
Execute Actions Tree action. The bad news is that you'd need to modify the code to make the second box update itself every time you change the item in the first box. I just made a quick test and seems like some extra events need to be fired (the current code will attempt to fire the "change" event on a few different ways) and still can't figure which are these. You might want to take a look at the code in the
Execute JS (Select Each) action in the premade.
3. About 99% of cases I've seen, the URL of the thumb image is a variation of the URL of the large picture. Here is a sample thumb URL:
http://lghttp.5679.nexcesscdn.net/8042C ... /tg1_1.jpg
And here is the larger version:
http://lghttp.5679.nexcesscdn.net/8042C ... /tg1_1.jpg
See the pattern? You'll basically need to use a javascript gatherer that takes the thumb and returns the src attribute with the "thumbnail/56x" replaced by "image/400x400".
By the way, if you haven't read it yet, you might find
this post useful.