A web scraping tool for extracting information from the website ukrlib.com.ua using aiohttp and requests_html. The data is organized into classes, authors, and books, including bios, book summaries, and audio links. The information is stored in a JSON file and is intended to be used in other applications.
This is a Python project that runs a Telegram bot for literature studies. The project consists of two files, BOT_DB_.py
and literatureClient.py
.
This file uses the following libraries:
aiogram
for Telegram bot managementlogging
for logging eventsconfig
for token management
The file has functions for inline keyboard creation, user data handling, and callback query handling. It also imports and uses functions from literatureClient.py
.
This file has the following classes:
BSCH
for handling school booksDB
for handling book content
The file imports the following libraries:
pandas
for data handlingrandom
for randomizationtelegraph
for creating HTML content
The resource
folder contains JSON files for book content and school books.
To run the project, the following libraries must be installed:
aiogram
pandas
telegraph
json
The project uses Telegram API and requires a Telegram Bot token to run. Detailed instructions on how to create a bot and obtain a token can be found on the Telegram Bot API documentation page.
Це проект Python, який запускає бота Telegram для вивчення літератури. Проект складається з двох файлів, BOT_DB_.py
та literatureClient.py
.
У цьому файлі використовуються наступні бібліотеки:
aiogram
для керування ботом Telegramlogging
для реєстрації подійconfig
для керування токеном
Файл містить функції для створення вбудованої клавіатури, обробки даних користувача та обробки запитів зворотного виклику. Він також імпортує та використовує функції з literatureClient.py
.
У цьому файлі є наступні класи:
BSCH
для обробки шкільних книгDB
для обробки вмісту книг
Файл імпортує наступні бібліотеки:
pandas
для обробки данихrandom
для випадковостіtelegraph
для створення HTML-контенту
У папці «resource» знаходяться файли JSON для вмісту книг та шкільних книг.
Для запуску проекту необхідно встановити наступні бібліотеки:
aiogram
pandas
telegraph
json
Проект використовує Telegram API та потребує токену бота Telegram для роботи. Детальні інструкції щодо створення бота та отримання токену можна знайти на сторінці документації Telegram Bot API.