Web scraping is a process whereby data is mined or useful information is collected from website(s). Python is a very versatile language that has been used in many fields including web scraping.
A short Python program (Fig 1) is all that’s needed to extract phone numbers and email addresses found on a website.
For this illustration, we data mine for all phone numbers and email addresses that are found on the car rental company Dollar’s website https://www.dollar.com/Help/main.aspx (Fig 2).
To run the demo, first go to the Dollar’s website and do a Ctrl-a to select the entire website content and Ctrl-c to copy the entire selection to the clipboard. Then, run the Python program webScraping.py (Fig 1). The output of the program is shown in Fig 3.