From 3262f94ae9a762926cdcf887d2e3d12732c69f98 Mon Sep 17 00:00:00 2001 From: hiitsmocha Date: Mon, 11 Nov 2024 17:27:44 -0600 Subject: [PATCH] modified main.py for github actions and yml file for chrome config --- .github/workflows/test_scraper.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_scraper.yml b/.github/workflows/test_scraper.yml index 70a9dfd..6a2ebed 100644 --- a/.github/workflows/test_scraper.yml +++ b/.github/workflows/test_scraper.yml @@ -41,7 +41,12 @@ jobs: - name: Install ChromeDriver run: | CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') - sudo curl -Lo /usr/local/bin/chromedriver "https://chromedriver.storage.googleapis.com/$CHROME_VERSION/chromedriver_linux64.zip" + echo "Chrome version is $CHROME_VERSION" + CHROMEDRIVER_VERSION=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION) + echo "Matching ChromeDriver version is $CHROMEDRIVER_VERSION" + curl -Lo /usr/local/bin/chromedriver "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" + sudo apt-get install -y unzip + sudo unzip /usr/local/bin/chromedriver -d /usr/local/bin/ sudo chmod +x /usr/local/bin/chromedriver - name: Run Scraper