INSTALLING LIBRARY:
First you need to install Python in your particular OS mine is WIndows so after installing Python you need to open cmd and run command for installing library we need two library 1. bs4 2. requests
bs4 library to scrape data and requests library to make request to http..
Installing BS4 :
run this command : pip install bs4
Installing Requests:
run this command : pip install requests
Now choose which website you want to scrape we will scrape https://www.mohfw.gov.in/ to scrape covid data from this government website.. So we will scrape Active Cases, Deaths etc
first import libraries:
You need to first inpect the class objects from website and which tags to scrape data.. Here as you can see we find "ul " tag with "li" and we put the data inside a function and looped through. dont forget to use .get_text() function to get text in the console and print it. We put the data in tkinter GUI
0 Comments
Don't Spam In Comments