Skip to content

Commit

Permalink
chromedriver install
Browse files Browse the repository at this point in the history
  • Loading branch information
hiitsmocha committed Nov 14, 2024
1 parent facfe0e commit b4da857
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions .github/workflows/test_scraper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,11 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- name: Install ChromeDriver
run: |
# Get the major version of the installed Chrome
CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+' | head -1)
echo "Installed Chrome major version is $CHROME_VERSION"
# Find the closest ChromeDriver version available for this major version
CHROMEDRIVER_VERSION=$(curl -sS "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION" || echo "")
if [ -z "$CHROMEDRIVER_VERSION" ]; then
echo "No matching ChromeDriver version found for Chrome $CHROME_VERSION."
exit 1
fi
echo "Installing ChromeDriver version $CHROMEDRIVER_VERSION"
curl -Lo /tmp/chromedriver.zip "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
sudo apt-get install -y unzip
sudo unzip /tmp/chromedriver.zip -d /usr/local/bin/
wget https://chromedriver.storage.googleapis.com/94.0.4606.61/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/
sudo chmod +x /usr/local/bin/chromedriver
- name: Run Scraper
Expand Down

0 comments on commit b4da857

Please sign in to comment.