This project is a news aggregator developed using Django, which scrapes news headlines from a specified source and displays them on a web page.
Home Page
News
- Clone the repository and navigate into the project directory:
git clone https://github.com/VaishnaviSingh1/New-Aggregator-Using-Django.git
cd New-Aggregator-Using-Django
- Create a virtual environment and activate it:
python -m venv env
source env/bin/activate # On Windows use `env\Scripts\activate`
- Install dependencies using pip:
pip install -r requirements.txt
- Make migrations and migrate to set up the database:
python manage.py makemigrations
python manage.py migrate
- Start the development server:
python manage.py runserver
Visit http://localhost:8000/ in your web browser to view the application.
- Scraping News
To scrape news headlines, use the /scrape/ endpoint, where is the name of the source to scrape from.
- Viewing News
Navigate to /news/ to view the scraped news headlines.
-
Python
-
Django
-
BeautifulSoup (for web scraping)
-
Requests (for making HTTP requests)