Posted April 07, 2016
high rated
mrkgnao: Cheers. Much appreciated.
If possible, try to find some place that lists the price of an individual game in US$ (in US) if bundled, not as in the commands you quote:
- the bundle percent discount (which is notoriously incorrect on quite a few GOG pages)
- the total bundle price (for then it is unclear what the price of each game in the bundle is, if they are not equally priced, as is sometimes the case)
Well.. all the information used in the page is contained in the source of the page (so it's obviously just passed through by the PHP or whatever server side script they use) in a <script> tag. If possible, try to find some place that lists the price of an individual game in US$ (in US) if bundled, not as in the commands you quote:
- the bundle percent discount (which is notoriously incorrect on quite a few GOG pages)
- the total bundle price (for then it is unclear what the price of each game in the bundle is, if they are not equally priced, as is sometimes the case)
I'm not sure how easy or difficult it would be for you to access, if you can use javascript at all then it should be easy but from what you've said that's not possible. You might just be able to lift it and parse it as JSON (it does seem to be legitimate JSON) and then access the variables within that way...
If you want to see what information is there you can just type gogData in the console and look through it (to see if it's any use before making any effort to access it).
The important bits being;
gameProductData
which contains a series variable with various information
The price variable within series contains the original price, the discount (in percentage and amount) and the total bundle price with the discount.
There's also a products array with info on all items in the bundle (including their prices as part of the bundle)
It has data for both the normal series discounted and the current Enhanced Edition Bundle (though it seems to only include the two Baldur's Gate EE games and not Icewind Dale, though it has the correct 60% discount), so it seems to cover both scenarios but I'd have to check when another bundle discount (the Deponia one works, but as it is also a series I'm not sure it's ideal) is on to make sure...
I seem to remember we discussed the issue of finding bundle sale prices was actually that the promo urls were the only easy place to get them and those weren't logical or predicable in anyway...
I'll keep looking for anything else that might be useful.