Skip to content

This repository contains example for a web scraping tutorial using Selenium.

License

Notifications You must be signed in to change notification settings

karthikn2789/Selenium-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Web Scraping Project

The project contains a selenium example written in Python to demonstrate web scraping. In this project, PM2.5 values from https://openaq.org are extracted and stored in a JSON file using Selenium.

To run the openaq_scraper.py file, Selenium and a webdriver needs to be installed. Selenium can be installed using the following command.

pip install selenium

Webdriver for 5 major browsers are supported by Selenium. Chromedriver for Chrome browser can be installed using the following commands.

wget https://chromedriver.storage.googleapis.com/83.0.4103.39/chromedriver_linux64.zip

unzip chromedriver_linux64.zip

sudo mv chromedriver /usr/local/bin/

Geckodriver for Firefox can be installed with the following command.

sudo apt install firefox-geckodriver

To run the project, execute openaq_scraper.py file and it will generate 3 JSON files as output. countries_list.json contains names of all the countries listed in https://openaq.org. URLs of all the locations reporting PM2.5 values will be stored in urls.json. And the extracted PM2.5 values will be stored in openaq_data.json.

About

This repository contains example for a web scraping tutorial using Selenium.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages