Skip to content

A Python script scraper.py for web scraping news headlines from a specified website using BeautifulSoup and requests libraries.

License

Notifications You must be signed in to change notification settings

Pranjol-Dev/web-scraping-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Web Scraping Tool for News Headlines

This repository contains a Python script scraper.py for fetching and displaying news headlines from a specified website using BeautifulSoup and requests libraries.

Usage

  1. Clone the repository:

    git clone https://github.com/Pranjol-Dev/web-scraping-tool.git
    cd web-scraping-tool
  2. Install dependencies:

    pip install requests beautifulsoup4
  3. Modify the URL in scraper.py with the website you want to scrape headlines from.

  4. Run the script:

    python scraper.py
  5. The script will fetch and display news headlines from the specified website.

Example

For scraping news headlines from the BBC News website, modify scraper.py:

url = 'https://www.bbc.com/news'

Dependencies

  • Python 3.6 or higher
  • requests library for making HTTP requests
  • beautifulsoup4 library for parsing HTML

Notes

  • 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.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Author

About

A Python script scraper.py for web scraping news headlines from a specified website using BeautifulSoup and requests libraries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages