Trying to find out why the part1 is starting
This commit is contained in:
parent
9bd96ad876
commit
e6e8bdaa06
|
@ -16,3 +16,4 @@ file.png
|
|||
*.ts
|
||||
LICENSE
|
||||
README.md
|
||||
venv
|
||||
|
|
12
V6.py
12
V6.py
|
@ -1,4 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
import random
|
||||
|
||||
from modules.Classes.Config import Config
|
||||
from modules.Classes.DiscordLogger import DiscordLogger
|
||||
from modules.Classes.UserCredentials import UserCredentials
|
||||
|
@ -9,8 +11,6 @@ from modules.db import add_to_database
|
|||
from modules.driver_tools import *
|
||||
from modules.error import *
|
||||
|
||||
import random
|
||||
|
||||
|
||||
# create a webdriver
|
||||
def create_driver(mobile=False):
|
||||
|
@ -210,12 +210,12 @@ def all_cards():
|
|||
welcome_tour = driver.find_element(By.ID, "welcome-tour")
|
||||
interest_button_box = welcome_tour.find_element(By.CLASS_NAME, "interest-buttons")
|
||||
interests = interest_button_box.find_elements(By.CLASS_NAME, "ng-binding")
|
||||
debug("Got the following interests: "+str(interests))
|
||||
random.choice(interests).click() # Choose interest
|
||||
debug("Got the following interests: " + str(interests))
|
||||
random.choice(interests).click() # Choose interest
|
||||
custom_sleep(1.5)
|
||||
|
||||
claim_button = welcome_tour.find_element(By.ID, "claim-button")
|
||||
claim_button.click() # submit
|
||||
claim_button.click() # submit
|
||||
custom_sleep(1.5)
|
||||
return True
|
||||
|
||||
|
@ -476,10 +476,12 @@ def login():
|
|||
def logged_in():
|
||||
driver.get("https://login.live.com")
|
||||
custom_sleep(10)
|
||||
debug(get_domain(driver))
|
||||
if get_domain(driver) == "account.microsoft.com":
|
||||
return True
|
||||
return False
|
||||
|
||||
info("Logging in...")
|
||||
driver = config.WebDriver.driver
|
||||
try:
|
||||
if not logged_in():
|
||||
|
|
Loading…
Reference in New Issue