summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.py b/main.py
index 11f3093..e98ce95 100644
--- a/main.py
+++ b/main.py
@@ -4,6 +4,7 @@ from selenium.webdriver.chrome.options import Options
 from time import sleep
 import logging
 import os
+import sys
 from dotenv import load_dotenv
 
 
@@ -83,7 +84,7 @@ def main_loop(driver):
     while True:
         # if this is not found, then we presume we have to login again
         try:
-            row = driver.find_element(By.XPATH, f"//tr[td[contains(text(), '18.50')]]")
+            row = driver.find_element(By.XPATH, f"//tr[td[contains(text(), '{sys.argv[1]}')]]".format())
         except Exception:
             loginRenfe(driver)
             navigate_to_tickets(driver)