This is the code I wrote and used during a short tutorial I created for our research group in March 2022. The code may not work now as websites commonly change their page structures. Note that this is for educational purposes only, and web scraping should be handled carefully.
There are two notebooks:
- web_scraping_basics.ipynb: Some basics are explained and applied using an actual real estate website.
- google_automation.ipynb: Scraping information from Google snippets is explained.
Tools used in this tutorial:
- Python 3.10.2
- Selenium 4.1.3
- ChromeDriver 99.0.4844.51