Skip to content

Commit

Permalink
cant
Browse files Browse the repository at this point in the history
  • Loading branch information
hiitsmocha committed Nov 23, 2024
1 parent 0ce96c2 commit ccd12be
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/test_scraper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,36 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Setup Chrome and ChromeDriver
- name: Setup Chrome and ChromeDriver
uses: browser-actions/[email protected]
with:
chrome-version: 120 # Match your target Chrome version
install-chromedriver: true
# Ensure CHROME_BIN and CHROMEDRIVER_PATH are exported
- name: Export Chrome and ChromeDriver Paths
- name: Install Chrome and ChromeDriver
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable
sudo apt-get install -y chromium-chromedriver
# Ensure chromedriver is in PATH
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
env:
CHROME_BIN: "/usr/bin/google-chrome"
CHROMEDRIVER_PATH: "/usr/local/bin/chromedriver"

- name: Verify ChromeDriver Installation
run: |
echo "CHROME_BIN=/usr/bin/google-chrome" >> $GITHUB_ENV
echo "CHROMEDRIVER_PATH=$(which chromedriver)" >> $GITHUB_ENV
which chromedriver
chromedriver --version
# Run the scraper
- name: Run Scraper
env:
CHROME_BIN: ${{ env.CHROME_BIN }} # Pass Chrome binary path to your script
CHROMEDRIVER_PATH: ${{ env.CHROMEDRIVER_PATH }} # Pass ChromeDriver path to your script
CHROME_BIN: "/usr/bin/google-chrome"
CHROMEDRIVER_PATH: "/usr/local/bin/chromedriver"
run: |
python main.py
- name: Save Excel Output
# Create a file name with the date and time
run: |
timestamp=$(date +"%Y-%m-%d_%H-%M-%S")
mv output.xlsx "output_$timestamp.xlsx"
mv "output_$timestamp.xlsx" results/
- name: Commit and Push the Excel file
run: |
git config --local user.email "[email protected]"
Expand Down

0 comments on commit ccd12be

Please sign in to comment.