conversations-about-important-api
Неофициальное API "разговоров о важном", на деле простой парсер.
Быстрый старт
- Устанавливаем библиотеку:
pip install conversations-about-important-api
- Запустите код ниже:
"""Пример взаимодествия с библиотекой.""" # noqa: RUF002
import datetime as dt
from conversations_about_important_api import CAIParser
def get_next_date() -> str:
"""Получаем ссылку для парсинга."""
# Получаем текущую дату
now = dt.datetime.now() # noqa: DTZ005
# Меняем дату на следующий понедельник
now += dt.timedelta(days=7 - now.weekday())
# Переводим дату в строку и возвращаем её
return now.strftime("%d-%m-%Y")
if __name__ == "__main__":
parser = CAIParser()
data = parser.get_info(get_next_date())
print(data)
Выдаёт такой ответ:
{ "title": "Массовый спорт в России", "str_date": "10 марта 2025", "image_url": "https://разговорыоважном.рф/img/2025/10-03-2025.jpg", "plakat_url": "https://разговорыоважном.рф/10-03-2025/plakat.jpg", "videos_urls": [ "https://разговорыоважном.рф/10-03-2025/1.mp4", "https://разговорыоважном.рф/10-03-2025/2.mp4", "https://разговорыоважном.рф/10-03-2025/3.mp4", "https://разговорыоважном.рф/10-03-2025/4.mp4", "https://разговорыоважном.рф/10-03-2025/5.mp4" ] }
Подробнее
- Создаём и активируем виртуальное окружение (venv):
Использование виртуального окружения (venv) является лучшей практикой.
python3 -m venv venv
. venv/bin/activate
ВАЖНО!
Вторая команда для Windows выглядит так:
venv\Scripts\activate.bat
- Устанавливаем библиотеку:
pip install conversations-about-important-api
- Далее используйте код из "Быстрого старта" 🤗
Made with ❤️ by iamlostshe.
Metadata
Release files for conversations-about-important-api 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| conversations_about_important_api-0.1.0.tar.gz | 5.8 kB | Without provenance | Details for conversations_about_important_api-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| conversations_about_important_api-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for conversations_about_important_api-0.1.0-py2.py3-none-any.whl |
Total release size: 11.1 kB
Release files / conversations_about_important_api-0.1.0.tar.gz
| Download URL | conversations_about_important_api-0.1.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6581fc836f4a6f10bad755a443a3784a33e913857ddd99efa6af1ef769684f03
|
|
BLAKE2b-256 checksum How to use checksums |
579138975a94266c865c429bffc9986e0b32967a4a5296a7037e85629f7fe41e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.2
|
Release files / conversations_about_important_api-0.1.0-py2.py3-none-any.whl
| Download URL | conversations_about_important_api-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a3b597ee697c25c3043b5bb1953fed845e6d5276cad6652faf7e45f716d2a8d8
|
|
BLAKE2b-256 checksum How to use checksums |
be89ef04ebbd62b4da9e966904f9aa6d885950aee83179693f18d613c799bf40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.2
|
Security for conversations-about-important-api 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.