News Searcher is a Python application that allows users to search for news articles using the NewsAPI. It provides a command-line interface for searching news based on various criteria such as keywords, language, category, and date range.
- Search news articles by keyword, language, category, and date range
- Display search results with title, source, date, and URL
- Export search results to CSV file
- Interactive command-line interface
-
Clone this repository:
git clone https://github.com/yourusername/news-searcher.git cd news-searcher
-
Install the required dependencies:
pip install -r requirements.txt
-
Obtain an API key from NewsAPI
-
Create a
config.py
file in the project root and add your API key:API_KEY = "your_api_key_here"
Run the script using Python:
python news_searcher.py
Follow the prompts to enter your search criteria:
- Search term
- Language (en for English, es for Spanish)
- Category (business, entertainment, general, health, science, sports, technology)
- Date range
- Number of results
The application will display the search results and offer the option to export them to a CSV file.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.