Skip to main content

基于微博H5 API开发的机器人框架

Project description

WeiboBot

基于微博H5 API开发的机器人框架

PyPI Python Version Python Implementation

License

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


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.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

WeiboBot-0.0.3-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file WeiboBot-0.0.3.tar.gz.

File metadata

  • Download URL: WeiboBot-0.0.3.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

Hashes for WeiboBot-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9b4b554ddacb6fa739c7605b8e67369ee4f12d8d742265b7488b9beee71f48db
MD5 0910727bef0eec61acdc0e8ad4fda433
BLAKE2b-256 109f83fdfcdd202f5f5bdbe371163025f8394785f2733b36ed50ac3de45a862d

See more details on using hashes here.

File details

Details for the file WeiboBot-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: WeiboBot-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 25.3 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

Hashes for WeiboBot-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ff6703f0cdeb4dc6f8838e413f6d3a96bc1a7139ea39bb52b13db4850d65a07
MD5 eb0adeb2343b2dec9cb97d3ec9b1aa45
BLAKE2b-256 89a2a19d293452ff89e4bc783a2b255534ca945e9e9b99673a33fcbedb312a78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page