I wrote this code to scrape the contents and photos from ads on ricardo.ch. In my case, I was interested in used Lego sets from three different lines: Star Wars, Duplo and Technic. However, you could repurpose this code quite easily to scrape any type of Ricardo ad and compile the contents into a data frame.
The following files are included in this repo:
- ricardo_webscraping.ipynb: This is the jupyter notebook with all the code.
- 20201228_ricardo_ads_df.csv: This is the data frame that was saved to the drive from the notebook.
- 20201228_legoset_20.jpg: This is an example of an image scraped from ricardo.ch, in this case it belongs to ad number 20.