News Scraper is a Python script that scrapes the latest news from SecurityLab.ru, retrieving details such as the author, publication date, title, and description of each news post. The collected data is saved in JSON format for further analysis or processing.
News Scraper — это Python-скрипт для парсинга новостей с сайта SecurityLab.ru. Он собирает информацию, такую как автор, дата публикации, заголовок и описание каждой новости, и сохраняет её в формате JSON для дальнейшего анализа или обработки.
- Scrapes news from SecurityLab.ru.
- Extracts and stores the following information for each news post:
- 🖋️ Author
- 🕒 Date of publication
- 📰 Title
- 📝 Description
- 🌐 URL of the news post
- Парсинг новостей с SecurityLab.ru.
- Извлечение и сохранение следующей информации о каждой новости:
- 🖋️ Автор
- 🕒 Дата публикации
- 📰 Заголовок
- 📝 Описание
- 🌐 URL новости
main.py— The main script that scrapes the website and saves the data.requirements.txt— File with dependencies to install.
main.py— Основной скрипт, который парсит сайт и сохраняет данные.requirements.txt— Файл с зависимостями для установки.
-
Clone the repository:
git clone https://github.com/one-one-five/News_Scraper.git
-
Navigate to the project directory:
cd News_Scraper -
Install the required dependencies:
pip install -r requirements.txt
-
Run the script:
python main.py
-
Клонируйте репозиторий:
git clone https://github.com/one-one-five/News_Scraper.git
-
Перейдите в директорию проекта:
cd News_Scraper -
Установите необходимые зависимости:
pip install -r requirements.txt
-
Запустите скрипт:
python main.py
- The script sends a request to SecurityLab.ru to retrieve the number of pages with news.
- It loops through each page, collecting data from the news posts.
- The data is saved in a JSON file.
- Скрипт отправляет запрос на SecurityLab.ru, чтобы получить количество страниц с новостями.
- Затем он проходит по каждой странице, собирая данные с новостных постов.
- Данные сохраняются в файл JSON.