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 the price or other data from the bot. #81

Closed iagopm closed 2 years ago

iagopm commented 2 years ago

Since one week or so Amazon now detects this bot, the behaviour is not the typical "You must not scrape from Amazon please" but instead Amazon just deletes all the info in the html code.

Paste the contents of your config.json, excluding the token, here:

{
  "prefix":"!",
  "token":"",
  "minutes_per_check":4.5,
  "search_response_ms": 60000,
  "url_params":{},
  "guild_item_limit":30,
  "cache_limit": 30,
  "required_perms":["permission_1", "permission_2"],
  "tld":"es",
  "auto_cart_link":true,
  "debug_enabled":true
}

Thanks in advance.

SpikeHD commented 2 years ago

You noted that HTML would be output without the information, can you dump for me the entire HTML?

iagopm commented 2 years ago

After a few days without running the bot it now returns the price in the html code 2022-01-06 13_07_39-Window

Link : https://www.amazon.es/dp/B08GDDZML8/? Here's the html bot retrieved. https www.amazon.es dp B08GDDZML8.txt and this is the data it parsed:

2022-01-06 13_05_06-Window

Maybe amazon has changed the classes of the html elements so now it has to be scraped using a diferent classes or element id?

Happy new year !

SpikeHD commented 2 years ago

Yeah! I've seen that happen a couple times, I'll add those in sometime super soon, thanks for letting me know!

SpikeHD commented 2 years ago

Pushed an update, see if that works

iagopm commented 2 years ago

The first product the bot checked the price successfully, but the second product just produced the "To discuss automated access to Amazon data please contact api-services-support" message.

SpikeHD commented 2 years ago

Yeah that would be the bot detection page. Try decreasing your minutes_per_check, or the amount of items in your watchlist, or also try using a proxylist