SpikeHD / AmazonMonitor

Amazon price checker, item monitor and stock monitor, all shoved into a Discord bot
GNU General Public License v3.0
234 stars 39 forks source link

[BUG] Cannot get price tags #80

Closed EternAlmox closed 2 years ago

EternAlmox commented 3 years ago

After working for 2 or 3 hours, i realized that "lastPrice" was not updating. I changed the items to an item that is in stock and still not able to get the price tag. Even with !details command it didnt work.

link to product; https://www.amazon.co.uk/dp/B00NBR70DO/?

respond from !details command

image

{
  "prefix":"!",
  "token":"",
  "minutes_per_check":2,
  "search_response_ms": 30000,
  "url_params":{},
  "guild_item_limit":5,
  "cache_limit": 10,
  "required_perms":["ADMINISTRATOR"],
  "tld":"co.uk",
  "auto_cart_link":false,
  "debug_enabled":true
}
### Provide console output with debug mode enabled:

[MESSAGE]  Loading command: details.js
[MESSAGE]  Loading command: help.js
[MESSAGE]  Loading command: search.js
[MESSAGE]  Loading command: unwatch.js
[MESSAGE]  Loading command: watch.js
[MESSAGE]  Loading command: watchlist.js
[DEBUG]  Data storage type: json
[MESSAGE]  Watchlist Loaded
[MESSAGE]  Puppeteer Launched
[MESSAGE]  Type: headless
[MESSAGE]  Waiting a couple seconds for JavaScript to load...
[DEBUG]  Got page in 5504ms
[MESSAGE]  Type: headphones, earphones & accessories

                 headphones & earphones
[DEBUG]  Detected as a regular item
[DEBUG]  Full object:
[DEBUG]  {
  full_title: 'Sony MDR-ZX110 Overhead Headphones - Black',
  full_link: 'https://www.amazon.co.uk/dp/B00NBR70DO/?',
  asin: 'B00NBR70DO',
  seller: 'Visit the Sony Store',
  price: '',
  symbol: '',
  shipping: 'Free with prime',
  rating: '4.5 out of 5 stars',
  features: [
    ' - Make sure this fits\nby entering your model number.',
    ' - Make sure this fits\nby entering your model number.',
    ' - by entering your model number.',
    ' - 30 mm dome drivers for balanced sound',
    ' - High energy neodymium magnets deliver powerful sound',
    ' - 12-22 kHz frequency range',
    ' - Padded ear cups for comfortable listening',
    ' - Choice of colours to suit your style'
  ],
  availability: 'In stock.',
  image: 'https://m.media-amazon.com/images/I/71kYRBupfUL._AC_SL1500_.jpg'
}
[WARNING]  Detected 2 empty values. Could potentially mean bot was flagged
SpikeHD commented 3 years ago

Might be an oversight that it isn't getting the price on an item with one of those crossed out sales prices. I'll take a look sometime soon.

SpikeHD commented 2 years ago

May have been fixed in #81, lemme know if you still have trouble!