Skip to content

Commit

Permalink
modified main.py for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hiitsmocha committed Nov 11, 2024
1 parent 1a036ae commit d14fde3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ def new_line_remover(question):
def setup():
global single_case
global single_incident

# Configure Chrome options for GitHub Actions environment
options = webdriver.ChromeOptions()
options.add_argument("--headless") # Run Chrome in headless mode
options.add_argument("--no-sandbox") # Bypass OS security model
options.add_argument("--disable-dev-shm-usage") # Overcome limited resource issues
options.add_argument("--disable-gpu") # Disable GPU hardware acceleration
options.add_argument("--remote-debugging-port=9222") # Enable remote debugging
options.binary_location = "/usr/bin/google-chrome" # Path to Chrome binary

# Specify the path to ChromeDriver
service = Service("/usr/local/bin/chromedriver")
driver = webdriver.Chrome(service=service, options=options)
service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
Expand Down Expand Up @@ -436,5 +449,6 @@ def main():
else:
cases = collecting_information(driver)
extracting_information(driver, cases)

driver.quit()

main()

0 comments on commit d14fde3

Please sign in to comment.