Giter VIP home page Giter VIP logo

amazonmonitor's Introduction

I currently work as a software developer in Canada.

Stuff About Me

  • 👨‍💻 I have some experience in all sorts of different things:
    • JavaScript/NodeJS/TypeScript/NPM packages
    • Browser Extensions
    • HTML/CSS/JQuery
    • React/Preact
    • Web-to-desktop libraries like Electron, Tauri and Neutralino
    • SQL
    • Rust
    • C++
    • Java
    • API development, including a small amount of GraphQL
    • Docker, Kubernetes, and *some* components of AWS
  • 🍲 Aside from all of that ^, I really like spicy food and collecting games I will never play.
  • 💙 I enjoy helping people! Never be afraid to ask me something, unless it can be summarized in a GitHub issue 😪
  • 🖼️ I'm probably most proud of my Dorion, CSMLC or AmazonMonitor projects

amazonmonitor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amazonmonitor's Issues

docker container

Hello,

its possible to create a docker container for this ?

Regards

Null checks on the item objects

Hey there,

I think it'd be good to do some null checks on the item objects of Amazon. I've got recently the error below and I've debugged the object. Seems like the item.price is missing from the object, hence it's being thrown. I guess for sanity it'd be good to handle this?

[DEBUG]  {
  guild_id: '801051518605721641',
  channel_id: '801051555255681024',
  link: 'https://www.amazon.nl/dp/B08HLZXHZY/?',
  lastPrice: 0,
  item_name: '',
  priceLimit: '1000',
  type: 'link'
}
(node:7732) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
    at pushPriceChange (C:\Users\Administrator\Desktop\AmazonMonitor\common\util.js:345:26)
    at doCheck (C:\Users\Administrator\Desktop\AmazonMonitor\common\util.js:213:39)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:7732) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

The links added theirselves a question mark, haven't read the code so I'm unsure if the bot does this or that it's some weird catch on the input.

Side note:

The bot is not flagged, checked and tested. Other items work fine, it's just on certain items somehow. That's why I'm asking if a sanity check would be useful and needed here.

Help me please

Hello everyone and thank you for this wonderful project.
I have tried several times to install the monitor but can't do it due to the reason below, if anyone could help me out that would be great.
I thank you in advance.

C:\Users\izido\OneDrive\Bureau\AmazonMonitor-master\AmazonMonitor-master>node index
internal/modules/cjs/loader.js:1131
throw err;
^

SyntaxError: C:\Users\izido\OneDrive\Bureau\AmazonMonitor-master\AmazonMonitor-master\config.json: Unexpected string in JSON at position 101
at parse ()
at Object.Module._extensions..json (internal/modules/cjs/loader.js:1128:22)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:92:18)
at Object. (C:\Users\izido\OneDrive\Bureau\AmazonMonitor-master\AmazonMonitor-master\common\debug.js:2:27)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)

my config :

{

"prefix":"!",
"token":" "
"minutes_per_check":2,
"search_response_ms": 30000,
"url_params":{},
"guild_item_limit":5,
"cache_limit": 10,
"required_perms":["ADMINISTRATEUR", "ADMINISTRATEUR"],
"tld":"es","fr","de","it",
"auto_cart_link":true
"debug_enabled":true
}

Another Throw Error After Re-Install

I reinstalled the updated code and deleted/reinstalled the MySQL database and installed everything and set up the bot again, but I got this error after node index :

K:\Downloads\AmazonMonitor-master\AmazonMonitor-master>node index
internal/modules/cjs/loader.js:1222
throw err;
^

in JSON at position 86ds\AmazonMonitor-master\AmazonMonitor-master\config.json: Unexpected token
at parse ()
�[90m at Object.Module._extensions..json (internal/modules/cjs/loader.js:1219:22)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:1034:32)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:923:14)�[39m
�[90m at Module.require (internal/modules/cjs/loader.js:1074:19)�[39m
�[90m at require (internal/modules/cjs/helpers.js:72:18)�[39m
at Object. (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\index.js:5:48)
�[90m at Module._compile (internal/modules/cjs/loader.js:1185:30)�[39m
�[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)�[39m
�[90m at Module.load (internal/modules/cjs/loader.js:1034:32)�[39m

Rewrite Basically Everything

Honestly? This project is messy as hell.

I think it's about time that this got a proper 2.0 release, with (hopefully) the following improvements:

  • Better async implementation (mysql2 module)
  • Getting rid of the weird bot object roots that tangled itself into like, everything
  • Class-y Amazon stuff. I could probably write the Amazon functionality into an npm module actually... (Done)
  • Better... code? I guess? I'm sure everything could use some improving honestly

Link

Where do I place the amazon links/products that I want to watch?

Doesn't seem to differentiate between ASINs

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?

How to run?

Sorry very new to this. How to I run it? isn't it npm start?

Nothing happened

I config acoording to note and use a stocked commodity to test, but nothing happened.
image
image2

Error

Hi

I can't get past the below error. Can you help
$ node index
node:internal/modules/cjs/loader:1170
throw err;
^

SyntaxError: C:\Users\ugur\Desktop\amazon\config.json: Unexpected token h in JSON at position 163
at parse ()
at Object.Module._extensions..json (node:internal/modules/cjs/loader:1167:22)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\ugur\Desktop\amazon\common\debug.js:2:27)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)

my config.json

{
"prefix":"!",
"token":"OTA2MTUxODU0NzYzODIzMTxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"minutes_per_check":2,
"search_response_ms": 30000,
"url_params":{https://www.amazon.com/PowerColor-Hellhound-Spectral-Graphics-Powered/dp/B094MM9X6S/ref=sr_1_2?keywords=6700xt&qid=1636109590&sr=8-2},
"guild_item_limit":5,
"cache_limit": 10,
"required_perms":["ADMINISTRATOR"],
"tld":"com",
"auto_cart_link":true,
"debug_enabled":enable
}

Unexpected item in json?

Getting the following error now when running

C:\Users\Administrator\Desktop\AmazonMonitor-master>node index
internal/modules/cjs/loader.js:1109
throw err;
^

SyntaxError: C:\Users\Administrator\Desktop\AmazonMonitor-master\config.json: Unexpected string in JSON at position 212
at parse ()
at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Users\Administrator\Desktop\AmazonMonitor-master\common\debug.js:2:27)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)

i'm using co.uk as the tld

Possible issue with search?

Seems search is trying to send an empty message back to Discord, or at least that's my interpretation of this, perhaps I'm interpreting it wrong?

I tried this with '!search Ryzen 9'

/usr/src/app/node_modules/discord.js/src/rest/RequestHandler.js:170
          return reject(new DiscordAPIError(request.path, data, request.method, res.status));
                        ^
DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (/usr/src/app/node_modules/discord.js/src/rest/RequestHandler.js:170:25)
    at processTicksAndRejections (node:internal/process/task_queues:93:5) {
  method: 'post',
  path: '/channels/*REDACTED*/messages',
  code: 50006,
  httpStatus: 400

Running !search Ryzen comes back with 16 results. I also am unable to run !quickwatch 16 for example. It does not add it to the watch list when I do get valid results and run a !quickwatch [number]

I tried googling around, but I think this is specific to the app and how it's processing, or perhaps I did something wrong with the install on my end, but I can't find a solution via googling so far...

Thanks for any help you can provide! Awesome app/bot too, thanks for making it!

Any way to make it less demanding on the CPU?

Hey, sorry to bug you again.

I am watching 20 items in one server. The CPU hits 100% every minute. If I add any more to my watchlist it just makes my RDP crash and burn. Any way to reduce it being so harsh on the CPU while still watching 20 items?

[BUG] Concurrency problem in search command.

Steps to reproduce:

Problem in await for response on search.js produces crash.

The response of the find request takes too much time to retrieve the result and then produces a crash. Making variable item null-safe and then reattempt the request should solve the issue.

Environment:
Windows 10 19XX and node 16.7.0

Example:
2021-08-31 11_30_08-Window

2021-08-31 11_42_23-Window

{
  "prefix":"!",
  "token":"",
  "minutes_per_check":4,
  "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
}

just a question

how would we go about using this bot but on a hosting website etc?

EDIT: Fixed that by looking at the troubleshooting but i have another question.
Am i able to get heroku to update my github repo? i say this because otherwise the bot is constantly running off the same price in "watchlist.json"

Product Variants

For example, on Amazon DE the Playstation has a shared product page with the controller and other accessories. The link changes when you select different product variants but when later visiting the link it automatically sends you to the controller.

Therefor the monitor pings for the camera coming in stock or changing in price.

Raspberry Pi: Specify Custom Chromium Install

I'll add this to the readme and submit a PR. Just writing this issue as a reminder for myself.

On a Raspberry Pi, the chrome-linux install is messed up. Not sure who to blame there, but it certainly isn't this repo's fault. To fix this, run sudo apt-get install chromium-browser and then edit common/util.js and change

browser = await pup.launch()

to

browser = await pup.launch({                                                                                                                                                  
  executablePath: '/usr/bin/chromium-browser'                                                                                                                               
})

Recognizes stock but doesn't post and dependencies issues

Hey,

Recognized a few errors while setting up the monitor today. I installed all the dependencies listed in package.json and their proper versions after having the issue with it not posting to the discord channel. However, I noticed a few of these dependencies were depreciated. Not sure if this contributes to the issue I am having. The two dependencies I noticed that were depreciated were request and request-promise. Discord bot had all permissions.

Errors:
image

Debug log:
image

Package-lock.json in .txt
package-lock.txt

Showing wrong price

Not entirely sure what is happening, I have an item that comes through on the monitor as $1200 but when you click the link it shows as $820 on amazon. I think it is showing the reseller prices? Any way to fix that?

Problem when loading the bot

Hi,

Bot was seemingly working well, now i'm getting the following error as soon as i run it.

C:\Users\Administrator\Desktop\AmazonMonitor-master>node install
internal/modules/cjs/loader.js:883
throw err;
^

Error: Cannot find module 'C:\Users\Administrator\Desktop\AmazonMonitor-master\install'
�[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:725:27)�[39m
�[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)�[39m
�[90m at internal/main/run_main_module.js:17:47�[39m {
code: �[32m'MODULE_NOT_FOUND'�[39m,
requireStack: []
}

Bitfield invalid error

Hi,

I'm getting the following error
RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.
at Function.resolve (C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\util\BitField.js:150:19)
at Permissions.has (C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\util\BitField.js:45:28)
at Permissions.has (C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\util\Permissions.js:45:85)
at C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\util\BitField.js:44:56
at Array.every ()
at Permissions.has (C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\util\BitField.js:44:40)
at Permissions.has (C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\util\Permissions.js:45:85)
at GuildMember.hasPermission (C:\Users\Administrator\Desktop\AmazonMonitor-master\node_modules\discord.js\src\structures\GuildMember.js:271:24)
at Client. (C:\Users\Administrator\Desktop\AmazonMonitor-master\index.js:61:26)
at Client.emit (events.js:315:20) {
bit: 'permission_1',
[Symbol(code)]: 'BITFIELD_INVALID'

Seems to happen when i try to add something to the watchlist

ERROR

(node:277080) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)

I put the command, anyone! Help,! Watch ..,! Search and it doesn't work, it keeps writing the bot and that's it.

I'm getting this, what might be the problem.

(node:12156) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, mkdtemp 'C:\Users\adity\AppData\Local\Temp;C:\Users\adity\AppData\Local\Programs\Python\Python37-32\Script\puppeteer_dev_chrome_profile-XXXXXX'
(Use node --trace-warnings ... to show where the warning was created)
(node:12156) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12156) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:12156) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (C:\Users\adity\Desktop\AmazonMonitor-master\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async RequestHandler.push (C:\Users\adity\Desktop\AmazonMonitor-master\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
(node:12156) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

Bot does not join

Hello,

I have put the correct Token and verified by putting an invalid one and the bot does not join the channel.
I have debug running and everything looks good, I opened the OAUTH2 URL and invited to server and it never came.

Any ideas?

[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
[LOG]  Checking item prices...
[LOG]  Checking item prices...

Some problems

Hello.

I use your codes and very glad of your program. But i have some questions.

1- Can we use 2 or more different region amazon site ? If we add them config.json is program will be work ?

2- Only the prices of the products sold by amazon appear in the main product. The prices given by other companies appear in available from these sellers option (as picture). I guess this program scan amazon's prices. Or could I be wrong ?

aaaa
bbbb

Automated Testing

While I don't have a plan for it yet, I think I could benefit from implementing some automated testing.

This is yet another reminder, so if you don't care about the code, this won't mean anything to you.

How to tell if the products are actually being monitored?

I got it all working, the commands work great. I add some items to my watchlist and they do appear in the !watchlist embed. I added stuff thats already in stock just to see what the monitor would do but it does nothing?

Any way for me to actually test it?

Async-ish rewrite

Leaving this as a reminder to myself that I need to async/await-ify everything, since a lot of it looks gross right now.

Basically everything will be changed and standardized, hopefully, but if you're reading this as a user and not of someone interested in the code, just know that none of the functionality will change.

Throw Error

When I was getting the links set up and I tried pulling up a blank watchlist or adding a product that was already added I would get this back :
Loading command: details.js
Loading command: help.js
Loading command: search.js
Loading command: unwatch.js
Loading command: watch.js
Loading command: watchlist.js
Watchlist loaded
Puppeteer launched
undefined
undefined
K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\Parser.js:437
throw err; // Rethrow non-MySQL errors
^

TypeError: Cannot read property 'link' of undefined
at Query. (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\commands\unwatch.js:29:92)
at Query. (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\Connection.js:526:10)
at Query._callback (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\Connection.js:488:16)
at Query.Sequence.end (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\sequences\Sequence.js:83:24)
at Query._handleFinalResultPacket (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\sequences\Query.js:149:8)
at Query.EofPacket (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\sequences\Query.js:133:8)
at Protocol._parsePacket (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (K:\Downloads\AmazonMonitor-master\AmazonMonitor-master\node_modules\mysql\lib\protocol\Protocol.js:38:16)

Price in euro missing decimals

Not sure if it's only when using amazon.de but decimals are missing, making it hard to track the price, Also the price is showing with $ in the beginning but also € at the end. So I don't know if I have to type in the price to track in usd, euro or with or without decimals

image

Watch Search Queries and Categories

With the upcoming Black Friday deals rolling in, it would be good to have a method of watching search queries and categories. This will be able to integrate into the existing watch command.

For my reference:

Category - https://www.amazon.ca/b/?_encoding=UTF8&node=677244011&bbn=667823011&pf_rd_r=66H9631JYNZ0K6D1DE1W&pf_rd_p=3e9d1eb9-c4b2-5d47-afdd-d1b6f48a1cdc

Search query - https://www.amazon.ca/s?k=nintendo+switch

No notifications & Proxies not working

Describe the issue:

Hi,

Took me a while to get this working as I'm new to all this but got there in the end, Only issue I'm having is I'm got getting any pings or any notifications while testing. I've tested an item which is less then £500 and put a limit of 1000 but its not notifying me so I think there is something wrong.

Also I'm in the UK and the bot shows a $ sign when it pings to confirm watched item does that matter?

Also when I add proxies then it don't run, But the main thing is I'm not getting any price drop notifications.

Would love to get this working, Thanks in advance.

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

[{
  "prefix":"!",
  "token":"",
  "minutes_per_check":2,
  "search_response_ms": 30000,
  "url_params":{},
  "guild_item_limit":10,
  "cache_limit": 10,
  "required_perms":["ADMINISTRATOR", "ADMINISTRATOR"],
  "tld":"co.uk",
  "auto_cart_link":true,
  "debug_enabled":true
}]

Provide console output with debug mode enabled:

[LOG]  Checking item prices...
[MESSAGE]  Type: headless
[MESSAGE]  Waiting a couple seconds for JavaScript to load...
[DEBUG]  Got page in 5683ms
[MESSAGE]  Type: pools, hot tubs & supplies

                swimming pools

                 frame pools
[DEBUG]  Detected as a regular item
[DEBUG]  Full object:
[DEBUG]  {
  full_title: 'INTEX 28273NP 177.25in x 86.625in x 33in Rectangular Frame Pool - Blue',
  full_link: 'https://www.amazon.co.uk/dp/B000XO2RV8/??',
  asin: 'B000XO2RV8',
  seller: 'Visit the Intex Store',
  price: '494.95',
  symbol: '£',
  shipping: 'Free with prime',
  rating: '4.5 out of 5 stars',
  features: [
    ' - Approx set-up size: 450cm x 220cm x 84cm',
    ' - Water Capacity(90%): 1,883gal(7,127L)',
    ' - Puncture-resistant 3-ply material',
    ' - Model number: 28273NP'
  ],
  availability: 'Only 2 left in stock.',
  image: 'https://images-na.ssl-images-amazon.com/images/I/511uAALQwyL._AC_SL1024_.jpg'
}
]

PROXY ISSUE:
[MESSAGE] Type: proxy
[MESSAGE] Selected proxy URL: (DELETED)
[ERROR] Error: net::ERR_FAILED at https://www.amazon.co.uk/dp/B000XO2RV8/ at navigate (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:115:23)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async FrameManager.navigateFrame (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:90:21)
at async Frame.goto (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:417:16)
at async Page.goto (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:784:16)
at async Object.exports.getPage (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\util.js:139:3)
at async Object.exports.details (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\Amazon.js:104:16)
at async Object.module.exports.run (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\commands\watch.js:60:18)
at async exec (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\index.js:75:3)
[ERROR] $ is not a function
[ERROR] TypeError: Cannot read property 'full_link' of undefined
at Object.module.exports.run (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\commands\watch.js:64:20)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async exec (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\index.js:75:3)
(node:12268) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async RequestHandler.push (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\discord.js\src\rest\RequestHandler.js:39:14)
(Use node --trace-warnings ... to show where the warning was created)
(node:12268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

$ SIGN AND NOT £ IMAGE BELOW

Screenshot 2021-06-20 at 03 15 43

[ERROR] 301 from Amazon.de

Describe the issue:

Hello, I'm trying to get this to work with an proxylist but I can't get it to work.
Tried multiple proxy providers with user/pass and IP authentication but no luck so far.
Proxies are not flagged since a manual connect to any of them with browser works just fine on the URL.

Changing to proxyless works fine though.

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

{
"prefix":"!",
"token":"",
"minutes_per_check":0.5, (lowered for testing)
"search_response_ms": 30000,
"url_params":{},
"guild_item_limit":5,
"cache_limit": 10,
"required_perms":["ADMINISTRATOR"],
"tld":"de",
"auto_cart_link":true,
"debug_enabled":true
}

Provide console output with debug mode enabled:

[WARNING] This message is not an error, and the bot is still running.
[MESSAGE] Watchlist Loaded
[MESSAGE] Puppeteer Launched
[LOG] Checking item prices...
[MESSAGE] Type: proxy
[MESSAGE] Selected proxy URL: http://XXXXX:[email protected]
[MESSAGE] Waiting a couple seconds for JavaScript to load...
[DEBUG] Got page in 3135ms
[MESSAGE] Type:
[DEBUG] Detected as a regular item
[DEBUG] Full object:
[DEBUG] {
full_title: '',
full_link: 'https://www.amazon.de/dp/B08LNWPYRS/??',
asin: 'B08LNWPYRS',
seller: '',
price: '',
symbol: '',
shipping: 'Free with prime',
rating: '',
features: [],
availability: '',
image: 'https://via.placeholder.com/300x300.png?text=No+Image'
}
[WARNING] Detected 7 empty values. Could potentially mean bot was flagged

Wrong price format on last Price + some bugs

The format was wrong on the New price as well but I fixed it on line 32 (util.js) where it says: return p.replace(',','') => return p.replace(',','.')

image

But I can't find a way to fix the old price as well.

Also in data.js line 84 where it says const data = JSON.parse(fs.readFileSync(watchFile)) I replaced const with var because it was giving an error (don't remember the error).

image

Last thing: It sends every 5 minutes or so the same price even without changing.

image

JSON data storage

I think it would be safe to use a JSON file to store the watchlist as an optional alternative the MySQL. This would make setup easier for everyone and would remove a decent part of it entirely.

Bot doesnt show details when doing (prefix)(number)

so my prefix is c! and I tried doing c!2 or c![2] and both got no output nor and errors on the cli.. any ideas?

Edit: found why. theres a timer in the file. I set it to something more reasonable so you have time to read.

however the c!details (link) command seems to be broken. It just shows "none nonenone none" and a "no-image" image.. for every link I tried so far

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.