idk
This commit is contained in:
parent
5b95893bf0
commit
510c7f7251
12
V4.py
12
V4.py
|
@ -519,6 +519,18 @@ def BingPcSearch(override=randint(35, 40)):
|
||||||
|
|
||||||
|
|
||||||
def unban():
|
def unban():
|
||||||
|
driver.get("https://login.live.com")
|
||||||
|
CustomSleep(5)
|
||||||
|
LogError("test", driver, _mail)
|
||||||
|
mail = driver.find_element(By.ID, "i0116")
|
||||||
|
send_keys_wait(mail, _mail)
|
||||||
|
mail.send_keys(Keys.ENTER)
|
||||||
|
WaitUntilVisible(By.ID, "i0118", browser = driver)
|
||||||
|
pwd = driver.find_element(By.ID, "i0118")
|
||||||
|
send_keys_wait(pwd, _password)
|
||||||
|
pwd.send_keys(Keys.ENTER)
|
||||||
|
CustomSleep(5)
|
||||||
|
|
||||||
driver.find_element(By.ID, "StartAction").click()
|
driver.find_element(By.ID, "StartAction").click()
|
||||||
CustomSleep(2)
|
CustomSleep(2)
|
||||||
txt = driver.page_source
|
txt = driver.page_source
|
||||||
|
|
32
V5.py
32
V5.py
|
@ -32,8 +32,14 @@ driver = None
|
||||||
global _mail, _password
|
global _mail, _password
|
||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
def printf():
|
def printf(e, f = ""):
|
||||||
pass
|
print(e+f)
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
# remove points from database when a reward is claimed
|
||||||
|
# remove the auto-claim feature as it seams to create huge risk of ban
|
||||||
|
# handle "panda"'s error: error while logging in preventing some task to be done
|
||||||
|
|
||||||
custom_sleep = CustomSleep
|
custom_sleep = CustomSleep
|
||||||
|
|
||||||
# Wait for the presence of the element identifier or [timeout]s
|
# Wait for the presence of the element identifier or [timeout]s
|
||||||
|
@ -482,7 +488,7 @@ def login():
|
||||||
global driver
|
global driver
|
||||||
def sub_login():
|
def sub_login():
|
||||||
printf("sub_login : start")
|
printf("sub_login : start")
|
||||||
driver.get("https://www.bing.com/rewardsapp/flyout")
|
driver.get("https://login.live.com")
|
||||||
for i in [f'[title="Rejoindre"]', f'[title="Join now"]', f'[title="Rejoindre maintenant"]'] :
|
for i in [f'[title="Rejoindre"]', f'[title="Join now"]', f'[title="Rejoindre maintenant"]'] :
|
||||||
try:
|
try:
|
||||||
driver.find_element(By.CSS_SELECTOR, i).click() # depend of the language of the page
|
driver.find_element(By.CSS_SELECTOR, i).click() # depend of the language of the page
|
||||||
|
@ -580,6 +586,7 @@ def bing_pc_search(override=randint(35, 40)):
|
||||||
|
|
||||||
# Unban account, called with -u parameter
|
# Unban account, called with -u parameter
|
||||||
def unban() -> None:
|
def unban() -> None:
|
||||||
|
LogError("test", driver, _mail)
|
||||||
driver.find_element(By.ID, "StartAction").click()
|
driver.find_element(By.ID, "StartAction").click()
|
||||||
custom_sleep(2)
|
custom_sleep(2)
|
||||||
txt = driver.page_source
|
txt = driver.page_source
|
||||||
|
@ -972,7 +979,7 @@ def ShowDefaultTask():
|
||||||
for i in ["PC", "Mobile"]:
|
for i in ["PC", "Mobile"]:
|
||||||
ShowTask(task[i])
|
ShowTask(task[i])
|
||||||
|
|
||||||
display = SmartDisplay(size=(2000+hash(_mail), 1000+hash(_mail)))
|
display = SmartDisplay(size=(2000, 1000))
|
||||||
display.start()
|
display.start()
|
||||||
|
|
||||||
|
|
||||||
|
@ -980,14 +987,12 @@ if CUSTOM_START:
|
||||||
CustomStart(Credentials)
|
CustomStart(Credentials)
|
||||||
elif UNBAN:
|
elif UNBAN:
|
||||||
_mail, _password = select_accounts(False)[0]
|
_mail, _password = select_accounts(False)[0]
|
||||||
try :
|
driver = uc_chrome_driver()
|
||||||
driver = uc_chrome_driver()
|
try :
|
||||||
login()
|
login()
|
||||||
raise NotBanned
|
except Banned:
|
||||||
except Banned :
|
|
||||||
unban()
|
unban()
|
||||||
except NotBanned :
|
|
||||||
printf("you are not currently banned on this account")
|
|
||||||
driver.quit()
|
driver.quit()
|
||||||
|
|
||||||
elif CLAIM:
|
elif CLAIM:
|
||||||
|
@ -1030,9 +1035,12 @@ else:
|
||||||
custom_sleep(attente)
|
custom_sleep(attente)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("canceled")
|
print("canceled.")
|
||||||
|
driver.quit()
|
||||||
|
display.stop()
|
||||||
|
except Exception as e:
|
||||||
|
print(f"error not catched. exiting. {e}")
|
||||||
driver.quit()
|
driver.quit()
|
||||||
display.stop()
|
display.stop()
|
||||||
|
|
||||||
|
|
||||||
display.stop()
|
display.stop()
|
Loading…
Reference in New Issue