对应 weibo-webhook 的提交器
Project description
weibo-poster
✨ 基于 weibo-webhook 的博文提交器 ✨
额 pip 会用不
pip install weibo-poster
python 会写不
from weibo_poster import BiliGo, DanmakuPost, Poster, RoomInfo, WeiboRequest, logger
poster = Poster(188888131, "", "")
session = WeiboRequest("")
biligo = BiliGo("poster", "http://localhost:8080", 21452505)
PostList = list()
async def uidFilter(_: RoomInfo, danmaku: DanmakuPost):
if danmaku.uid == "434334701":
await danmaku.update()
return True
return False
@biligo.on("DANMU_MSG", uidFilter)
async def recv(roomInfo: RoomInfo, danmaku: DanmakuPost):
logger.info(danmaku)
@Poster.job(name="七海", start=2, args=["7198559139"])
async def weibo(uid: str):
await poster.online()
post = None
async for post in session.posts(uid):
if post.mid not in PostList:
PostList.append(post.mid)
await poster.update(post)
if post is not None:
async for comment in session.comments(post):
if comment.uid == uid:
await poster.update(comment)
Poster.run(biligo.run, poster)
哦那你就会了
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
weibo-poster-0.0.9.tar.gz
(10.0 kB
view details)
File details
Details for the file weibo-poster-0.0.9.tar.gz
.
File metadata
- Download URL: weibo-poster-0.0.9.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ffec6410834eec9f3a6abfcc92f9da935f8b84687972fc9d38723a209c9c91a |
|
MD5 | c6d3e03b6f5f81b459093afd9c2999e8 |
|
BLAKE2b-256 | 2d8e2454f54d936fb31485f52dfbb5afc0d5f76c36dd111d93134d013e02d842 |