
Scrapping Table Data with Python selenium
Final Exam, DANL 210-01, Spring 2024
📌 Directions
This is an exam on a paper, so minor coding errors are expected. My main focus is on your approach to each question — the logic, algorithms, and syntax you use. Nearly perfect code will be rewarded with bonus credit.
Data Collection
url = 'https://webscraper.io/test-sites/tables/tables-semantically-correct'Question 1
- Convert the first table in the above webpage into the DataFrame,
table_0, using thepandastable scrapping method.
Question 2
- Use selenium to load the webpage.
- Then, scrap the all the data in the first table in the webpage using the
selenium’s Inspect-find_element(s)strategy withfor-loop. - Then, export the table data as a CSV file with the file name, table_0.csv