文档
·
下载
使用
下面是一个简易的提交脚本 ~(∠・ω< )
需要安装前置库 post-submitter (Github)
pip install post-submitter
from loguru import logger
from submitter import Submitter, Weibo
URL = "http://localhost:9000"
TOKEN = "********"
UID = "188888131"
PostList = []
@Submitter(url=URL, token=TOKEN, dedeuserid=UID)
async def _(sub: Submitter):
wb = Weibo()
@sub.job(interval=5, uid=7198559139)
async def _(uid: int):
async for post in wb.posts(uid):
if post.mid not in PostList:
PostList.append(post.mid)
logger.info(post)
err = await sub.submit(post)
if err is not None:
logger.error(err)
else:
logger.info("提交成功")