jef / streetmerchant

🤖 The world's easiest, most powerful stock checker
https://jef.buzz/streetmerchant
MIT License
4.96k stars 1.3k forks source link

Ignoring max price - 5900X - Amazon FR - Used #2199

Closed Shivy011 closed 3 days ago

Shivy011 commented 3 years ago

Expected Behavior

Chrome shouldn't open to the Amazon FR Page

Current Behavior

Streetmerchant opens 5900X page despite me having a max 600 limit for 5900X

Steps to Reproduce

Environment

# Copy this file and name it as `dotenv` (without backticks)
# Read https://jef.codes/streetmerchant/getting-started/#customization for help on customizing this file
########################################################################################################

ASCII_BANNER=
ASCII_COLOR=
AUTO_ADD_TO_CART=true
BROWSER_TRUSTED=
DESKTOP_NOTIFICATIONS=
DISCORD_NOTIFY_GROUP=
DISCORD_NOTIFY_GROUP_3060=
DISCORD_NOTIFY_GROUP_3060TI=
DISCORD_NOTIFY_GROUP_3070=
DISCORD_NOTIFY_GROUP_3080=
DISCORD_NOTIFY_GROUP_3090=
DISCORD_NOTIFY_GROUP_CORSAIR_SF=
DISCORD_NOTIFY_GROUP_RX6800=
DISCORD_NOTIFY_GROUP_RX6800XT=
DISCORD_NOTIFY_GROUP_RX6900XT=
DISCORD_NOTIFY_GROUP_RYZEN5600=
DISCORD_NOTIFY_GROUP_RYZEN5800=
DISCORD_NOTIFY_GROUP_RYZEN5900=
DISCORD_NOTIFY_GROUP_RYZEN5950=
DISCORD_NOTIFY_GROUP_SONYPS5C=
DISCORD_NOTIFY_GROUP_SONYPS5DE=
DISCORD_NOTIFY_GROUP_XBOXSX=
DISCORD_NOTIFY_GROUP_XBOXSS=
DISCORD_NOTIFY_GROUP_TEST=
DISCORD_WEB_HOOK=

HEADLESS=true
IN_STOCK_WAIT_TIME=
LOG_LEVEL=
LOW_BANDWIDTH=true
MAX_PRICE_SERIES_3060="650"
MAX_PRICE_SERIES_3060TI="750"
MAX_PRICE_SERIES_3070="900"
MAX_PRICE_SERIES_3080="1300"
MAX_PRICE_SERIES_3090="2000"
MAX_PRICE_SERIES_CORSAIR_SF=
MAX_PRICE_SERIES_RX6800="800"
MAX_PRICE_SERIES_RX6800XT="1000"
MAX_PRICE_SERIES_RX6900XT="1500"
MAX_PRICE_SERIES_RYZEN5600=
MAX_PRICE_SERIES_RYZEN5800=
MAX_PRICE_SERIES_RYZEN5900="600"
MAX_PRICE_SERIES_RYZEN5950="750"
MAX_PRICE_SERIES_SONYPS5C=
MAX_PRICE_SERIES_SONYPS5DE=
MAX_PRICE_SERIES_XBOXSS=
MAX_PRICE_SERIES_XBOXSX=
MAX_PRICE_SERIES_TEST=
MICROCENTER_LOCATION=
MQTT_BROKER_ADDRESS=
MQTT_BROKER_PORT=
MQTT_CLIENT_ID=
MQTT_PASSWORD=
MQTT_QOS=
MQTT_TOPIC=
MQTT_USERNAME=
OPEN_BROWSER=
PAGE_BACKOFF_MIN=
PAGE_BACKOFF_MAX=
PAGE_SLEEP_MIN=
PAGE_SLEEP_MAX=
PAGE_TIMEOUT=
PAGERDUTY_INTEGRATION_KEY=
PAGERDUTY_SEVERITY=
PHILIPS_HUE_API_KEY=
PHILIPS_HUE_CLOUD_ACCESS_TOKEN=
PHILIPS_HUE_CLOUD_CLIENT_ID=
PHILIPS_HUE_CLOUD_CLIENT_SECRET=
PHILIPS_HUE_CLOUD_REFRESH_TOKEN=
PHILIPS_HUE_LAN_BRIDGE_IP=
PHILIPS_HUE_LIGHT_COLOR=
PHILIPS_HUE_LIGHT_IDS=
PHILIPS_HUE_LIGHT_PATTERN=
PHONE_CARRIER=
PHONE_NUMBER=
PLAY_SOUND=
PROXY_ADDRESS=
PROXY_PROTOCOL=
PROXY_PORT=
PUSHBULLET=
PUSHOVER_EXPIRE=
PUSHOVER_RETRY=
PUSHOVER_TOKEN=
PUSHOVER_USER=
PUSHOVER_PRIORITY=
RESTART_TIME=
SCREENSHOT=true
SHOW_ONLY_BRANDS=
SHOW_ONLY_MODELS=
SHOW_ONLY_SERIES="ryzen5900,ryzen5950,rx6800,rx6800xt,rx6900xt,3060,3060ti,3070,3080,3090"
SLACK_CHANNEL=
SLACK_TOKEN=
SMARTTHINGS_TOKEN=
SMARTTHINGS_SWITCH_LABEL=
SMTP_ADDRESS=
SMTP_PORT=
STORES="nvidia-gb,amazon-de,amazon-de-warehouse,amazon-es,amazon-fr,amazon-it,amazon-uk,aria,ebuyer,novatech,very"
TELEGRAM_ACCESS_TOKEN=
TELEGRAM_CHAT_ID=
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_FROM_NUMBER=
TWILIO_TO_NUMBER=
TWITCH_ACCESS_TOKEN=
TWITCH_CHANNEL=
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
TWITCH_REFRESH_TOKEN=
TWITTER_ACCESS_TOKEN_KEY=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_TWEET_TAGS=
STREAMLABS_ACCESS_TOKEN=
STREAMLABS_TYPE=
STREAMLABS_IMAGE=
STREAMLABS_SOUND=
STREAMLABS_DURATION=
WEB_PORT=

Logs

[img]https://i.imgur.com/ffd8yeQ.png[/img]

Shivy011 commented 3 years ago

Any help please?

Shivy011 commented 3 years ago

Also having the same issue with Zotac RTX 3090. Max price set at 1900 but opening for a 3400 euro card

ikbenignace commented 3 years ago

I have the same problem

PaoloOranges commented 3 years ago

I was investigating the issue, it is more about where the price is taken. At the moment I have the same issue with this: https://www.amazon.es/gp/product/B095X51RHY The price selector is:

maxPrice: {
      container: '#priceblock_ourprice',
      euroFormat: true,
    },

but for some product the price is shown under other containers. In my specific case:

maxPrice: {
      container: '#priceblock_ourprice',
      euroFormat: true,
    },

It is possible that price appears on other selectors too, at the moment I saw those. @jef is there any way to implement an or in the price container selector, like in the outOfStock for instance?

PaoloOranges commented 3 years ago

I've just changed the selector for price to the parent one and it works. So for me this works:

    maxPrice: {
      container: '#price',
      euroFormat: true,
    },
jef commented 3 years ago

Hey @PaoloOranges, I see you have a new container for maybe the wrong site. Does this work for amazon-fr and amazon-es?

PaoloOranges commented 3 years ago

@jef I did use it for amazon-es only. I had the problem that I was receiving notification of prices higher then the limit set when the product was sold by a 3rd party. With that container it worked ok. I will test again in the next days and let you know, also for amazon-fr

jef commented 3 years ago

It could be the containers are dated. You let me know your results. Feel free to make a PR if you come up with success or report back here. Both work!

PaoloOranges commented 3 years ago

@jef .

    maxPrice: {
      container: '#price',
      euroFormat: true,
    },

Is the parent that contains the original one that you set:

    maxPrice: {
      container: '#priceblock_ourprice',
      euroFormat: true,
    },

The one you set works fine in most of the case but when there's a deal (or I remember a 3rd party price too, but I cannot find any example) like this: https://www.amazon.es/dp/B07PW9VBK5 (test:series) the container with the price is #priceblock_dealprice that fail in checking the price limit: imagen while price is imagen and system returns me "in stock".

using root, so `#price, unfortunately does not get the correct price since it's read the first number (that is the full one) but not the deal one. So my solution is not wrong but doesn't catch deals: it does detect the price but not the correct one displayed to user or valid at the moment, if more than one are present and the valid one is not the first that appear as child.