Skip to content

Commit

Permalink
<jx3>[feat]subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
HornCopper committed Sep 9, 2024
1 parent d12011f commit 6e455d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/jx3/weibo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from nonebot.log import logger

from src.tools.basic.group import send_subscribe

import asyncio

def trim_to_last_period(s: str) -> str:
Expand All @@ -17,7 +19,7 @@ def check_time(timestamp: str) -> bool:
async def execute_on_new_post(post):
data = trim_to_last_period(post.get("text_raw"))
logger.info({"data": data})
return {"text": data}
await send_subscribe("咸鱼", data)

async def poll_weibo_api(uid, interval=60):
async with async_playwright() as p:
Expand Down

0 comments on commit 6e455d4

Please sign in to comment.