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