A few notes - maybe not issues
Thanks for posting this btw, it stinks that I have to compete with scalpers in this way just to get one card for myself at the right cost.
A few notes:
-
the default setting in the config file was to refresh/add something to the cart every 5 seconds will block you in a couple of hours. I had 4 items, so I may have experienced that sooner than most
-
I tried this on Linux first and ran into trouble getting puppeteer to run. Installed Mozilla, set the PUPPETEER_EXECUTABLE directory to where firefox was, but then had memory issues because I was running this on a Raspberry Pi 3! After that, I installed Node.js 14.x on my Windows 10 PC, and was able to get it running
-
I found that I needed to create a .npmrc with the PUPPETEER_PRODUCT setting to be recognized. Probably me just being a noob with node on Windows
Chris
The author can generate a random number between 5-12 seconds for the refresh rate. This way it possibly will avoid IP ban. Here is the snippet:
function getRandomArbitrary(min, max) {
return Math.random() * (max - min) + min;
}
function getRandomInt(min, max) {
min = 5;
max = 12;
return Math.floor(Math.random() * (max - min + 1)) + min;
}