From 6c30fc0fd5ba3d617ed980c074975ab683ed5801 Mon Sep 17 00:00:00 2001 From: ImNotOssy Date: Thu, 5 Sep 2024 11:38:19 -0500 Subject: [PATCH] Update tornadoAPI.py --- tornadoAPI.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tornadoAPI.py b/tornadoAPI.py index 8176426e..e3f78c73 100644 --- a/tornadoAPI.py +++ b/tornadoAPI.py @@ -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