Skip to content

sudip-python-dev/country-data-scraper

Repository files navigation

Country Data Scraper

This is a Python web scraping project that extracts country information from the website:

https://www.scrapethissite.com/pages/simple/

The script collects country details such as capital city, population, and area, and stores the data into a CSV file.


Features

  • Extracts country names
  • Extracts capital cities
  • Extracts population data
  • Extracts area size (km²)
  • Saves all data into CSV format
  • Uses Requests and BeautifulSoup

Tools Used

  • Python
  • Requests
  • BeautifulSoup
  • CSV Module

Output

The script generates a CSV file:

country_data.csv

Example Output:

Country | Capital | Population | Area(km²)

India | New Delhi | 1,380,004,385 | 3,287,263


How to Run

Install required libraries:

pip install requests beautifulsoup4

Run the script:

python country_scraper.py


Project Purpose

This project was created as part of learning Python web scraping and practicing structured data extraction from websites.

About

Python web scraping project that extracts country data such as capital, population, and area from a website using Requests and BeautifulSoup and saves it into CSV format.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages