Skip to main content

对应 weibo-webhook 的提交器

Project description

weibo-poster

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


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

Uploaded Source

File details

Details for the file weibo-poster-0.0.5.tar.gz.

File metadata

  • Download URL: weibo-poster-0.0.5.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for weibo-poster-0.0.5.tar.gz
Algorithm Hash digest
SHA256 a013a7fcd700dc8cbd9f0176c55d5cbe468dfc05e1d655f372c9c5ebdd5cf15f
MD5 c6b0bf53aad2231d80a3138ae0297454
BLAKE2b-256 4cac580165dc7c34d98a0f7a6926a7486bf00e320f82ca52b76b96ec8f97a0a3

See more details on using hashes here.

Supported by

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