This project is a simple web scraper that fetches top news headlines from a public news website and saves them into a .txt
file using Python.
requests
– for sending HTTP requestsBeautifulSoup
(bs4
) – for parsing HTML contenthttps://www.bbc.com/news
BeautifulSoup
<h2>
headline tagsheadlines.txt
| File | Description |
|——|————-|
| web_scraper.py
| Python script to scrape headlines |
| headlines.txt
| Output file containing scraped headlines |
| README.md
| Project explanation and usage guide |