Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.18 KB

File metadata and controls

28 lines (20 loc) · 1.18 KB

Scraping-kidnapping-news-python-beautifulsoup

Kidnapping is a rampant social vice in many parts of the world, and staying informed about the latest incidents and trends can be crucial for individuals and organizations. In this tutorial, we will use Python and the BeautifulSoup library to scrape news articles on kidnapping from a newspaper website.

Prerequisites

To run this script, you will need the following libraries installed:

  • beautifulSoup
  • pandas
  • requests

You can install these libraries using the following command:

pip install beautifulsoup4 requests pandas

Usage

To use this script, simply clone the repository and run the following command:

python scrape-keyword.py

The script will scrape news articles related to the keyword "kidnap" from the PunchNG website and export the data to an Excel file called "Kidnap.xlsx".

You can also modify the script to scrape news articles related to a different keyword or from a different website. To do this, simply change the value of the "keywords" variable and the "base_url" variable in the script.

License

This project is licensed under the MIT License - see the LICENSE file for details.