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.
- Fetches Wikipedia descriptions using the
wikipedia-api
package. - Saves the results to a CSV file.
- Handles pages that do not exist gracefully.
- Python Version: 3.7+
- wikipedia-api
- csv To install the required package, run:
pip install wikipedia-api
- 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.
- Clone this repository to your local machine.
- Navigate into the project folder.
- Run the Python script with:
python main.py
This project is licensed under the MIT License.