alexanderquispe / QLAB_Summer_Python

This is an introduction of Python
MIT License
10 stars 16 forks source link

#366 Group 8 ass 5 2024 #433

Closed MendozaC25 closed 8 months ago

MendozaC25 commented 8 months ago

366 Final

Leidy Mezanina: I installed packages and advanced the first part of loop; the provided code contains a loop that iterates through election years, starting from 2 and going up to, but not including, 27.The WebDriver (driver) opens a base URL (url_base). The code interacts with a series of dropdowns (dropdown_paths_1) using XPaths to navigate to the desired election. An XPath is constructed based on the loop variable div to locate and click on the specific election element. The code retrieves the text from the selected election element and appends it to the eleccion_year_list. A short pause (time.sleep(1)) is added to allow the webpage to load. Another set of dropdowns (dropdown_paths_2) is interacted with, clicking on each dropdown element to perform further actions on the webpage.

Fernando Mendoza: in my case, I use Firefox, I created lines of code that utilize Selenium with this browser and do not conflict with the rest of the code. Completed the loop code so that I can later view the election data. Advanced the code to read the data from the tables using Pandas. Advanced the code to save the final results in an Excel file for the final presentation. Cleaned up unnecessary lines of code for a cleaner workflow."

Alvaro Gamonal: I added concatenating all the dataframes into one, removing the columns we don't want.

Nicolas Velarde: I did the final revision of the code correcting some errors regarding the export of Excel and the chromedriver code, I also added some lines of code to make the webscrapping process independent