Skip to content

Commit 63708d3

Browse files
committed
Minor fixes
1 parent b24d858 commit 63708d3

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

bot.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_credentials(self):
1313
def login(self, email, password, driver):
1414
driver.maximize_window()
1515
driver.fullscreen_window()
16-
driver.get("https://leetcode.com/login/")
16+
driver.get("https://leetcode.com/accounts/login/")
1717

1818
username = driver.find_element(By.ID, "username")
1919
username.click()
@@ -22,6 +22,7 @@ def login(self, email, password, driver):
2222
pwd = driver.find_element(By.ID, "password")
2323
pwd.click()
2424
pwd.send_keys(password)
25+
sleep(10) # Give person time to verify that they are a human
2526

2627
log = driver.find_element(By.ID, "login")
2728
log.click()

main.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
email, password = bot.get_credentials()
1212
bot.login(email, password, driver)
1313

14-
bot.click_play(driver)
1514
time_start = time()
16-
sleep(2)
17-
time_elapsed = time() - time_start
1815

1916
soup = bot.get_html(driver)
2017
select_random(driver)
21-
22-
sleep(2)
18+
sleep(2) # Wait for page to load
2319

2420
url = get_problem(driver)
2521
code = get_code(driver)

0 commit comments

Comments
 (0)