Skip to content

This project uses the **Wikipedia API** to fetch the first paragraph of Wikipedia pages for a given list of class names. The results are saved in a CSV file for further use.

License

Notifications You must be signed in to change notification settings

SandeepJilla/wikipedia-description-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Wikipedia Description Fetcher 🧠

This project uses the Wikipedia API to fetch the first paragraph of Wikipedia pages for a given list of class names. The results are saved in a CSV file for further use.

📋 Features

  • Fetches Wikipedia descriptions using the wikipedia-api package.
  • Saves the results to a CSV file.
  • Handles pages that do not exist gracefully.

🚀 Project Setup and Requirements

  • Python Version: 3.7+

Dependencies:

  • wikipedia-api
  • csv To install the required package, run:
pip install wikipedia-api

How the Script Works

  • Initializes a connection to the Wikipedia API using a custom User-Agent to avoid request blocking.
  • Takes a list of class names (biological classifications).
  • Fetches the first paragraph of each Wikipedia page.
  • Saves the results in a CSV file named wikipedia_descriptions.csv.

How to Run the Script

  • Clone this repository to your local machine.
  • Navigate into the project folder.
  • Run the Python script with:
python main.py

🔹 LICENSE (MIT License)

This project is licensed under the MIT License.

About

This project uses the **Wikipedia API** to fetch the first paragraph of Wikipedia pages for a given list of class names. The results are saved in a CSV file for further use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages