Skip to content

joyelere/scraping-kidnapping-news-python-beautifulsoup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages