forked from ChristianPerez34/AutoCryptoClaimer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
43 lines (33 loc) · 1.2 KB
/
Copy pathapp.py
File metadata and controls
43 lines (33 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import argparse
import pathlib
import time
from apscheduler.schedulers.background import BackgroundScheduler
from faucet_collector.crypto_claimer import CryptoClaimer
def claim_crypto_job(driver="chrome"):
crypto_claimer = CryptoClaimer()
crypto_claimer.start_driver(driver)
crypto_claimer.collect_crypto_faucets(crypto_faucets_file)
crypto_claimer.start_collecting_crypto()
scheduler = BackgroundScheduler()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Auto crypto claimer")
parser.add_argument("path", type=str, help="File path to text file")
parser.add_argument(
"-d",
"--driver",
action="store",
default="chrome",
help=
"Browser name of web driver to use i.e (Chrome, Firefox, and so forth)",
)
args = parser.parse_args()
crypto_faucets_file = pathlib.Path(args.path)
if crypto_faucets_file.suffix != ".txt":
raise SystemExit(
f"Unsupported file type: {crypto_faucets_file.suffix}\nSupported file type: .txt"
)
scheduler.add_job(claim_crypto_job, "interval", hours=1)
scheduler.start()
claim_crypto_job(args.driver)
while True:
time.sleep(1)