Skip to content

Conversation

@bluemix
Copy link

@bluemix bluemix commented Dec 1, 2020

Hello dear.
There are other ids than priceblock_ourprice.
I've added two more,

  • deals priceblock_dealprice (example)
  • sale price priceblock_saleprice (example)

I am not a pro at JS, but, this code solved my issue issue #33 .
I've also attached the screenshots for clarification.

Screen Shot 2020-12-01 at 04 08 52

Screen Shot 2020-12-01 at 04 34 55

@bluemix bluemix changed the title parsing price for '#priceblock_ourprice', 'priceblock_saleprice', 'pri… parsing other tag price ids Dec 1, 2020
@@ -1,4 +1,5 @@
// @ts-nocheck
fs = require('fs');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is wrong

: 0;

output.price.current_price = $(`#priceblock_ourprice`)[0] ? this.geo.price_format($($(`#priceblock_ourprice`)[0].children[0]).text()) : 0;
var _price = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let instead of var will be better

@aintHuman
Copy link

Can I also say that the price extraction doesn't work for almost every book that i have checked, they don't contain the id tag you are expecting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants