Coders Packet

Quote Scraper in Python using BeautifulSoup

By Shruti Solani

This project scrapes a quote from any of the websites written in code and displays it using Python. It can be scheduled to run every day at a particular time.

This project is a web scraping project in python. 

Libraries and modules used : 

1) bs4 (BeautifulSoup)

2) requests

3) schedule (optional)

4) Tkinter 

5) random


The above-mentioned libraries/modules need to be installed along with python3. Tkinter and random are included in python standard libraries. Use the following commands to install the other three:

1) bs4: pip install bs4

2) requests: pip install requests

3)  schedule: pip install schedule


'BeautifulSoup' is used to scrape data from the web.

The 'requests' module is used to send HTTP requests.

'Tkinter' is used to develop the GUI.

'random' is used to select a quote randomly from any 2 of the websites. More websites can be added in a similar fashion.

'schedule' can be used to make the script run at a fixed time. However, it needs the scripts to run always. This can be done using raspberry pi, python anywhere, amazon web services, etc. 

The script can also be scheduled to run using a task scheduler.

Download Complete Code


No comments yet