fix: ajustar las rutas de chromedriver #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fotocasa Scraper CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 9 * * 1" # Ejecutar todos los lunes a las 9:00 UTC | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Find Google Chrome binary | |
run: | | |
which google-chrome || echo "google-chrome not found" | |
which chromium || echo "chromium not found" | |
which chromedriver || echo "chromedriver not found" | |
echo "Chromium version:" | |
chromium --version || echo "Chromium not installed" | |
echo "Google Chrome version:" | |
google-chrome --version || echo "Google Chrome not installed" | |
echo "Chromedriver version:" | |
chromedriver --version || echo "Chromedriver not installed" | |
- name: Install Chrome and Chromedriver | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo apt install -y ./google-chrome-stable_current_amd64.deb | |
sudo apt-get install -y chromium-chromedriver | |
ln -s /snap/bin/chromium /usr/bin/google-chrome | |
ln -s /usr/bin/chromedriver /usr/local/bin/chromedriver | |
echo "Google Chrome version:" | |
google-chrome --version | |
echo "Chromedriver version:" | |
chromedriver --version | |
- name: Verify Chromium installation | |
run: | | |
which chromium | |
chromium --version | |
- name: Verify Chromedriver installation | |
run: | | |
which chromedriver | |
chromedriver --version | |
- name: Run Python script | |
run: python main.py |