Skip to content

This script is designed to scrape news articles from the [People Onliner](https://people.onliner.by/) website and save the extracted data into a CSV file.

License

Notifications You must be signed in to change notification settings

Jim-by/Script-for-parsing-news-articles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

News Articles Parser

This script is designed to scrape news articles from the People Onliner website and save the extracted data into a CSV file.

Requirements

To run this script, you need to have the following Python packages installed:

  • requests
  • lxml

You can install these packages using pip:

pip install -r requirements.txt

Usage

  1. Clone the repository:

git clone https://github.com/YOUR_USERNAME/data_science_project.git

  1. Navigate to the project directory:

cd data_science_project

  1. Install the required dependencies:

pip install -r requirements.txt

  1. Run the script:

python parser_script.py

The script will fetch the news articles from the website, extract the titles and links, and save them into a articles.csv file in the same directory as the script.

Output

The output file articles.csv will contain the following columns:

Title: The title of the news article. Link: The URL of the news article.

Error Handling

The script includes error handling for the following scenarios:

  • Network errors during the request.
  • Data extraction errors if the website structure has changed.
  • General exceptions.

License

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

Contact For any questions or issues, please contact vlma@tut.by.

About

This script is designed to scrape news articles from the [People Onliner](https://people.onliner.by/) website and save the extracted data into a CSV file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages