SpikeHD / AmazonMonitor

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

Doesn't seem to differentiate between ASINs #7

Closed openseauser closed 4 years ago

openseauser commented 4 years ago

I noticed that this seems to be based on title when comparin, rather than ASIN? Or maybe not, but for an ASIN with multiple ASINs attached to it, for example this: https://www.amazon.com/dp/B074DZNJ3T

it'll give me an update any time one of them becomes available, regardless of it's a differnet ASIN. so if the 20 pound is out of stock but the 15 pound isn't, when the 20 pound goes back into stock it'll "update" the 15 pound one with the price. Here's an example - notice the same 2020-04-30 09_18_29-MySQL Workbench price, but they're different products.

also, can we get it to follow more than 5 products?

openseauser commented 4 years ago

nevermind on the follow 5 or more, found where that can be adjusted

SpikeHD commented 4 years ago

Good catch! Yeah, a product page with multiple buying options like that won't be watching both prices, only the one you're actually viewing (aka the one you have highlighted).

The problem with the way Amazon handles multiple options like that is that when you click one of the other options, it's not actually redirecting you but instead hot-swapping the HTML for the site, which means there is no href attribute that the bot could reference to grab any item options listed since it's all through javascript. You'll just have to click the other item, grab it's URL, and watch it separately.

I would also advise you to not increase the watchlist limit too much, or the bot could stop working entirely.