Setting up selenium can be tricky business. That’s because it depends on (1) what machine you’re using, (2) what browser you would like to use Selenium on, (3) the version of the browser, (4) your operating system, and many other considerations. I used to struggle every time I worked with Selenium, spending so much time trying to set it up rather than working on the actual selenium code. That all changed when I started using Docker. This new approach runs a Chrome browser in a Docker container and our Selenium code connects to the container. In this way, it will work every time, on any device, on any operating system. It is also easy to set up, with minimal installation and minimal code. Here’s how:
Intro to Scraping Basketball Reference data
A short tutorial on how to scrape data from https://www.basketball-reference.com/ (or any other sports-reference.com site) with python Photo by Edgar Chaparro on Unsplash Sports-Reference.com is precisely where sports fandom…