arvindk1 commited on
Commit
358058c
·
verified ·
1 Parent(s): 7b44381

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -9,6 +9,7 @@ import undetected_chromedriver as uc
9
  from selenium.webdriver.common.by import By
10
  from selenium.webdriver.support.ui import WebDriverWait
11
  from selenium.webdriver.support import expected_conditions as EC
 
12
 
13
  def get_target_date(experations):
14
  today = datetime.today()
@@ -54,6 +55,14 @@ def main():
54
  options.add_argument('--no-sandbox')
55
  options.add_argument('--disable-dev-shm-usage')
56
 
 
 
 
 
 
 
 
 
57
  driver = uc.Chrome(options=options)
58
  driver.get(url)
59
 
 
9
  from selenium.webdriver.common.by import By
10
  from selenium.webdriver.support.ui import WebDriverWait
11
  from selenium.webdriver.support import expected_conditions as EC
12
+ import os
13
 
14
  def get_target_date(experations):
15
  today = datetime.today()
 
55
  options.add_argument('--no-sandbox')
56
  options.add_argument('--disable-dev-shm-usage')
57
 
58
+ # Set the Chrome binary location
59
+ chrome_binary_path = "/usr/bin/google-chrome-stable"
60
+ if os.path.exists(chrome_binary_path):
61
+ options.binary_location = chrome_binary_path
62
+ else:
63
+ st.error(f"Chrome binary not found at {chrome_binary_path}")
64
+ return
65
+
66
  driver = uc.Chrome(options=options)
67
  driver.get(url)
68