This repository contains a Python script scraper.py
for fetching and displaying news headlines from a specified website using BeautifulSoup and requests libraries.
-
Clone the repository:
git clone https://github.com/Pranjol-Dev/web-scraping-tool.git cd web-scraping-tool
-
Install dependencies:
pip install requests beautifulsoup4
-
Modify the URL in
scraper.py
with the website you want to scrape headlines from. -
Run the script:
python scraper.py
-
The script will fetch and display news headlines from the specified website.
For scraping news headlines from the BBC News website, modify scraper.py
:
url = 'https://www.bbc.com/news'
- Python 3.6 or higher
requests
library for making HTTP requestsbeautifulsoup4
library for parsing HTML
- Ensure responsible use of web scraping techniques and comply with the target website's terms of service.
- Customize the script for different websites and data extraction needs as required.
This project is licensed under the MIT License. See the LICENSE file for more details.
- GitHub: Pranjol-Dev