Skip to content

Commit

Permalink
Update tornadoAPI.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ImNotOssy committed Sep 5, 2024
1 parent aa0c1d6 commit 6c30fc0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tornadoAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,7 @@ def handle_buy(driver, stock, orderObj, loop):

try:
current_shares_element = driver.find_element(By.XPATH, '//*[@id="main-router"]/div[1]/div/div[4]/div')
if "sh" in current_shares_element.text.strip():
has_current_shares = True
else:
has_current_shares = False
has_current_shares = bool("sh" in current_shares_element.text.strip())
except NoSuchElementException:
has_current_shares = False

Expand Down

0 comments on commit 6c30fc0

Please sign in to comment.