From 444a46aa01974455d4931971602b0c2033fd99d8 Mon Sep 17 00:00:00 2001
From: 16bravo <cbravo2@yahoo.fr>
Date: Tue, 23 Apr 2024 16:16:19 +0200
Subject: [PATCH] correcting chrome driver version v2

---
 .github/workflows/000_scrape_data_manually.yml          | 7 +++++++
 scripts/000_Web_Scraping/001_Scraping_Latest_Matches.py | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/000_scrape_data_manually.yml b/.github/workflows/000_scrape_data_manually.yml
index cf4ccf4a..796d8e1f 100644
--- a/.github/workflows/000_scrape_data_manually.yml
+++ b/.github/workflows/000_scrape_data_manually.yml
@@ -17,6 +17,13 @@ jobs:
           
       - name: Installed package list
         run: apt list --installed
+
+      - name: Download ChromeDriver
+        run: |
+          wget -q "https://chromedriver.storage.googleapis.com/123.0.6312.0/chromedriver_linux64.zip" -O chromedriver.zip
+          unzip chromedriver.zip
+          chmod +x chromedriver
+          mv chromedriver /usr/local/bin/
         
       - name: Remove Chrome
         run: sudo apt purge google-chrome-stable
diff --git a/scripts/000_Web_Scraping/001_Scraping_Latest_Matches.py b/scripts/000_Web_Scraping/001_Scraping_Latest_Matches.py
index 04d4e9e3..10e0a346 100644
--- a/scripts/000_Web_Scraping/001_Scraping_Latest_Matches.py
+++ b/scripts/000_Web_Scraping/001_Scraping_Latest_Matches.py
@@ -12,8 +12,8 @@
 import sys
 
 '''chrome_service = Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install())'''
-chrome_driver_path = 'drivers/chromedriver'
-chrome_service = Service(chrome_driver_path)
+'''chrome_driver_path = 'drivers/chromedriver'
+chrome_service = Service(chrome_driver_path)'''
 
 chrome_options = Options()
 options = [
@@ -28,7 +28,8 @@
 for option in options:
     chrome_options.add_argument(option)
 
-driver = webdriver.Chrome(service=chrome_service, options=chrome_options)
+'''driver = webdriver.Chrome(service=chrome_service, options=chrome_options)'''
+driver = webdriver.Chrome(executable_path="/usr/local/bin/chromedriver")
 
 url = 'https://www.eloratings.net/latest'