sniffingpickles / Auto-Amazon-Giveaways

Automated Amazon Giveaways using Python3 & Pyppeteer :gift: :snake:
6 stars 8 forks source link

Suggest adding a loop function and random page function #5

Open dziban303 opened 6 years ago

dziban303 commented 6 years ago

As we talked about on the main fork, I think the bot should start via a loop.py to restart the bot if it crashes.

import sys

filename = sys.argv[1]
while True:
    print("\nStarting " + filename)
    #change the path to your python installation directory
    p = Popen("python.exe " + filename, shell=True)
    p.wait()

Also, I would suggest enabling the random page selection again. I see it's included in the new giveaway.py, but it's commented out.

sniffingpickles commented 6 years ago

It's not there because it has a database and just starts at the beginning. I can add a config to let you turn on random page, but I was actually winning contests (won 7 so far), because it restarts at page 1. The newer giveaways that select a random winner (first come first serve), are really easy to win with these reset loops.

robbiepee commented 6 years ago

I made my own simple restart-on-crash function using Pulover's Macro Creator. It's easier to make a hackjob solution to the problem than ask the creator who's just doing this for fun IfWinNotActive, Chromium { WinActivate, Select Command Prompt SendRaw, python give_it_away_now.py Send, {Enter} Sleep 10 SendRaw, youramazon@email.example Send, {Enter} SendRaw, youramazonpassword Send, {Enter} }

robbiepee commented 6 years ago

Also, i think the issue the random page function aims to solve is the fact that it cycles through giveaways that are already in the database. Is there a fix for that?