jpchip / giveaway-grabber

Automated Amazon Giveaways using Node & Puppeteer (until 10/17/19) 🎁
MIT License
74 stars 20 forks source link

Give user option to restart on page 1 when encountering end of pages #52

Closed famewolf closed 5 years ago

famewolf commented 5 years ago

My net is so slow that by the time I get to the last page it's pretty much time to start at the beginning again. (mainly due to missed capcha's and the aggravating necessity of sleep)

Perhaps the program could prompt in the console: Restart at Page 1 (Y/n):_

with no being the default. This cuts down on having to deal with the whole 2FA mess again and/or amazon asking for a capcha (if it's been asking for a capcha on the signin page somehow your program ignores it and continues so as soon as it dies on restart you get the guaranteed capcha you have to enter)

This would also work well in combination with the issue requesting to resume from where it left off since they might be towards the end of the pages.

jpchip commented 5 years ago

After #40 is complete I can add this as an option in the config file.

famewolf commented 5 years ago

FYI, When on the last page and it was showing "giveaway not found" I manually clicked it to page 1. The program kept on chugging and processing sweeps from page 1....the total count displayed however never reset ie page 1 was displayed as MaxPage + 1

Seems like the changes would be minimal to allow restarting at page 1.

KryptoNova commented 5 years ago

I have been thinking about this one in relation to making the bot a little more intelligent. I would like to introduce a yardstick and database driven approach to determining if it is time to click the bouncy box.

My plan would be to track boxes and when they ripen. When gg goes through all the pages it will go to sleep and wake up and start working again when either a sweep is determined to be mature or the sleep period between site sweeps. Extremely long term, I would hope to introduce some sort of Machine Learning to help determine when a sweep should be considered "ripe" based on when similar sweeps were considered won or expired.

However, this enhancement would be a great first step. I will type up the data driven approach sometime over the next couple of days. Especially now that the config file enhancement is done and in the wild.