Skip to main content

VKover

Telegram-стильная библиотека-юзербот для ВКонтакте на веб-токенах (api.vk.ru, Long Poll v3).

VK API после сентября 2026 закрыл сторонние приложения и токены Kate/Маруся. VKover работает как настоящий веб-клиент: логин через браузер один раз, дальше — REST API + Long Poll.

Установка

pip install .

Первый запуск (получение токена)

vkover-login --profile ./vk_profile --token-file ./web_token.json

Откроется Chromium (нужен Xvfb на сервере). Войдите в аккаунт VK. Токен появится в web_token.json.

Использование

from vkover import VKover, NewMessage

vk = VKover.from_files("web_token.json", profile_dir="./vk_profile")

@vk.on(NewMessage)
async def handler(event):
    print(event.peer_id, event.text)

vk.run()

Отправка и запросы:

vk.send(peer_id=100, text="привет")
vk.send_message_request(100, "сообщение", reply_to_cmid=5)
vk.send_reaction_request(100, cmid=5, reaction_id=3)
vk.delete_reaction_request(100, cmid=5)
vk.edit_message_request(100, message_id=6692, text="исправлено")
vk.delete_message_request([6692, 6693])
vk.forward_request(100, [11, 12], "пересылка")
vk.set_typing_request(100)
vk.request("messages.getConversations", count=20)

Токены и продление

Веб-токен живёт ~сутки. При передаче profile_dir в VKover.from_files библиотека автоматически открывает headless-Chromium и обновляет токен из localStorage профиля.

Тесты и бенчмарки

pip install pytest pytest-benchmark
pytest tests/ -q

Metadata

Release files for vkover 0.2.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vkover 0.2.9
File Size Uploaded
vkover-0.2.9.tar.gz 27.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vkover 0.2.9
File Interpreter ABI Platform
vkover-0.2.9-py3-none-any.whl Python 3 none any Details

Total release size: 56.8 kB

Release files / vkover-0.2.9.tar.gz

Download URL vkover-0.2.9.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0d8b1871b6e89729fa57a594fc0c96a108e60f2df6b2e472371c1368cb8bca2f
BLAKE2b-256 checksum
How to use checksums
e99d86b4b632f265ebb410a77b69b002994cb2691e794912f06307464424d2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / vkover-0.2.9-py3-none-any.whl

Download URL vkover-0.2.9-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fecab8c486a47e64258098d9039c8c2fc562d49ca2f96ac40d9e9b96287ece53
BLAKE2b-256 checksum
How to use checksums
6511cb9bb746dc5c0b4303e6a4699003193e21cd89bf8e46922de6ade2282fdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.9 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page