This Python script creates a simple graphical news application using Tkinter, displaying top headlines based on selected country and category fetched from the News API.
- Selection of Country and Category: Users can choose a country and a news category (e.g., Business, Entertainment, Technology) from dropdown menus.
- Search Functionality: Users can perform searches based on keywords to filter news articles.
- Dynamic Display: The application dynamically displays fetched news headlines in a scrollable frame with scrollbar support.
- Error Handling: In case of errors during data retrieval, appropriate error messages are displayed to the user.
- Ensure you have an active internet connection.
- Run the Python script
newsApp_v2.py
ornewsApp.py
. - Select a country, category, and optionally enter a search keyword.
- Click the refresh button or press Enter to load the news data.
- View the fetched news headlines displayed in the interface.
- Python 3.x
- Tkinter (usually included with Python installation)
urllib
library (for handling URL requests)json
library (for JSON data handling)threading
module (for multithreading)tkinter.ttk
module (for themed Tkinter widgets)
- Clone or Download the Repository:
- Clone the repository using Git:
git clone https://github.com/xenon134/Nova
- Alternatively, you can download the repository as a ZIP file and extract it to a preferred location on your computer.
- Navigate to the Project Directory:
Open a terminal or command prompt and change directory to the location whereyou've cloned or extracted the repository.
cd Nova
Run the Python script newsApp_v2.py or newsApp.py:
python newsApp_v2.py
or
python newsApp.py