forked from dheeth/Treasure-Cloud-Auto-Referral
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtreasure.py
119 lines (82 loc) · 3.4 KB
/
treasure.py
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import names
import password_generator
import itertools
import random
# Create new Instance of Chrome
driver_path = "chromedriver.exe"
brave_path = "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"
option = webdriver.ChromeOptions()
option.binary_location = brave_path
option.add_argument("--incognito")
option.add_argument("--start-maximized")
def type_me(element, text):
"""
Type like a human
"""
for letter in text:
element.send_keys(letter)
time.sleep(random.uniform(.1, .3))
for _ in itertools.repeat(None, 8):
browser = webdriver.Chrome(executable_path=driver_path, chrome_options=option)
# Temp Mail
browser.get("https://www.minuteinbox.com")
# Your Refereal Link
browser.execute_script("window.open('https://app.treasure.cloud/auth/signup?code=MTM5MGFhYjQtYmI4ZS0xMWViLTg5MTUtNTVlZWJmNWMyNDFjOmYwYTE0NjdhLTMyYzEtMTFlYi1iMWI4LTViYTQzMmY1ZjBkMA==');")
browser.switch_to.window(browser.window_handles[0])
time.sleep(2)
copyEmailButton = browser.find_element_by_css_selector('body > div:nth-child(2) > div:nth-child(4) > div > a.blockLink.copy.cetc')
copyEmailButton.click()
print("Email Copied!")
browser.switch_to.window(browser.window_handles[1])
print("Switching to Treasure Cloud!")
time.sleep(3)
pasteEmailButton = browser.find_element_by_css_selector('#mat-input-0')
pasteEmailButton.send_keys(Keys.CONTROL, 'v')
print("Email Pasted!")
time.sleep(0.5)
signUpButton = browser.find_element_by_css_selector('#signup-button')
signUpButton.click()
print("Signup Clicked!")
time.sleep(10)
browser.switch_to.window(browser.window_handles[0])
refreshButton = browser.find_element_by_css_selector('body > div:nth-child(2) > div:nth-child(4) > div > a.blockLink.refresh')
refreshButton.click()
print("Refresh Clicked!")
time.sleep(5)
wpccBtn = browser.find_element_by_css_selector('a.wpcc-btn')
wpccBtn.click()
print("Cookies Clicked")
verifyEmail = browser.find_element_by_css_selector('tr > td.from')
verifyEmail.click()
print("Email Clicked!")
time.sleep(5)
browser.switch_to.frame('iframeMail')
print("Switched to iFrame!")
verifyButton = browser.find_element_by_css_selector('#hs_cos_wrapper_module_16158863021462 > table > tbody > tr > td > a')
verifyButton.click()
print("Verify Button Clicked!")
browser.switch_to.default_content()
print("Switched Back")
time.sleep(7)
browser.switch_to.window(browser.window_handles[2])
nameButton = browser.find_element_by_css_selector('#mat-input-1')
type_me(nameButton, names.get_full_name())
password = password_generator.generate(length=10)
passButton = browser.find_element_by_css_selector('#mat-input-2')
type_me(passButton, password)
confirmPassButton = browser.find_element_by_css_selector('#mat-input-3')
type_me(confirmPassButton, password)
print("Waiting for Dismiss Button to Vanish")
time.sleep(5)
gotitButton = browser.find_element_by_css_selector('button.ng-tns-c58-0')
gotitButton.click()
print("Cookie Notification Clicked")
continueButton = browser.find_element_by_css_selector('#continue-button')
continueButton.click()
time.sleep(30)
print("Details Submitted!")
browser.quit()
time.sleep(5)