This Selenium tutorial for beginners module has been structure with easy to follow steps. We will introduce you to the world of web scraping with Python Using Selenium. The core scripting language (Python) has also been structure as a Python for beginners.

Web scraping is a very neat and at times very powerful technique to acquire data from another website, and data is knowledge and “power”.
This tutorial, we will show you how to perform web scraping using Selenium and Python, and after which parse (or output) the data into the Microsoft Excel spreadsheet for further manipulations.
We will show you how to install Python and Selenium, basic background on different libraries, illustrate typical gotchas in web scrapping and how to output the scrapped data into an Microsoft Excel spreadsheet.

I am using Morningstar webpage to show you how to perform web scrapping.

You can download the source from the the link below.
Source Code

Part 1: How to launch Morningstar webpage in Chrome Browser in incognito using Python

In this very first part, we will show you the basics of web scraping. We will show you how to install Python, Selenium and Chrome Driver. After that, we will write a short Python script to open a Chrome browser and launch Morningstar webpage in incognito mode.

This is a jam pack part, you will love it. Lets go!!!

Part 2: Webscrap Morningstar data
In part 2, we will be web scraping key performance indicator from the Morningstar webpage to get the following information.

  • Current EFT price
  • If the EFT fund is going up or down
  • How much has the EFT price gone up in dollars/cents
  • How much has the EFT price gone up in percentage
  • And the date and time stamp of when this data was captured (from the Morningstar webpage)

Part 3: Output the web scrapped data into Microsoft Excel spreadsheet
In this concluding part of the tutorial, we will show you how to move web scraping data to Excel. That is from the Morningstar webpage and land it in an Microsoft Excel spreadsheet in a CSV format.

Python:
https://www.python.org/downloads/

Sublime:
https://www.sublimetext.com

Leave a reply

Your email address will not be published. Required fields are marked *