基于微博H5 API开发的机器人框架
Project description
WeiboBot 是一个基于微博H5 API开发的机器人框架,提供了一个简单的接口,可以让你的机器人更加简单的接入微博,并且提供了一些简单的指令,比如:转评赞,回复消息等
安装
pip install WeiboBot
开始使用
from WeiboBot import Bot
from WeiboBot.message import Chat
from WeiboBot.weibo import Weibo
cookies = "your cookies"
myBot = Bot(cookies=cookies)
@myBot.onNewMsg
async def onMsg(oChat: Chat):
for msg in oChat.msg_list: # 消息列表
print(f"{msg.sender_screen_name}:{msg.text}")
@myBot.onNewWeibo
async def onWeibo(oWeibo: Weibo):
if oWeibo.original_weibo is None: # 原创微博
print(f"{oWeibo.text}")
if __name__ == '__main__':
myBot.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
WeiboBot-0.0.5.tar.gz
(23.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
WeiboBot-0.0.5-py3-none-any.whl
(25.4 kB
view details)
File details
Details for the file WeiboBot-0.0.5.tar.gz.
File metadata
- Download URL: WeiboBot-0.0.5.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f0ff2f640b6bc9ad4294eb43e7d5812de4908552dd2ee7505bf2b0d9fa78415
|
|
| MD5 |
ddbb496f6e334174946024cf147bd46f
|
|
| BLAKE2b-256 |
df0f1c1871f7a5d85b52d17e73aa41f2c4f25fc10aa3710c53fe1ad59aeeb2be
|
File details
Details for the file WeiboBot-0.0.5-py3-none-any.whl.
File metadata
- Download URL: WeiboBot-0.0.5-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08419b6557b5bab9af1a12039f475630a7fa4019ab4942c8fb96b62c0083da87
|
|
| MD5 |
85beea0673229948a653a951febc0d40
|
|
| BLAKE2b-256 |
fca2ae542d81dff8da7b5023b65a2f02bc6b3657c2449fc2d8ce7f921f291375
|