mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-06-05 15:09:47 +08:00
🐛 修复网页控制台批量推送
换行无法正确解析的错误
This commit is contained in:
parent
90ba2fd54c
commit
887edb91c0
@ -315,11 +315,11 @@ async def _update_plugins(request: Request, data: Dict):
|
||||
async def _batch_push(request: Request, data: Dict):
|
||||
send_msg = data['push_text']
|
||||
soup = BeautifulSoup(send_msg, 'lxml')
|
||||
stag = soup.p
|
||||
|
||||
msg: List[Message] = []
|
||||
if stag:
|
||||
text = stag.get_text(strip=True)
|
||||
msg.append(MessageSegment.text(text))
|
||||
text_list: List[Tag] = list(soup.find_all('p'))
|
||||
for text in text_list:
|
||||
msg.append(MessageSegment.text(str(text)[3:-4]))
|
||||
|
||||
img_tag: List[Tag] = list(soup.find_all('img'))
|
||||
for img in img_tag:
|
||||
|
Loading…
x
Reference in New Issue
Block a user