The News Aggregator project is a web application built using Django, designed to aggregate and display news articles fetched from various websites using web scraping techniques. It incorporates JavaScript for dynamic user interactions such as theme toggling and event handling.
-
Top News Section: Displays top news articles scraped from multiple sources.
-
Personalized News: Users can view articles based on different categories.
-
Dark/Light Mode: Toggle between dark and light themes for better readability, implemented using JavaScript event listeners and CSS manipulation.
-
Search Functionality: Allows users to search for specific news topics.
-
Web Scraping: Utilizes Beautiful Soup for fetching and parsing news articles.
-
Human Readable Timestamps: Converts timestamps into a human-readable format using the humanize library.
-
Django: Powerful web framework for backend development and rendering HTML templates. JavaScript used for dynamic client-side interactions.
-
HTML/CSS/JavaScript: Frontend development and interactivity. JavaScript is used for theme toggling, event handling, and dynamic content updates.
-
Beautiful Soup: Python library for web scraping, used to retrieve and parse news articles from various websites.
-
Humanize: Python library for converting timestamps into human-readable format for enhanced user experience.
-
Git: Version control system for tracking changes in the project codebase.
-
GitHub: Platform for hosting the project repository and collaboration.
To run this project locally, follow these steps:
- Clone this repository.
git clone https://github.com/Mehnaz2004/NewsAggregator.git
- Navigate to the project directory.
cd NewsAggregator
- Install dependencies.
pip install -r requirements.txt
- Perform database migrations.
python manage.py makemigrations python manage.py migrate
- Start the development server
python manage.py runserver
- Open the web browser and go to [http://localhost:8000] to view the application
inspiration and references: