以下是大神 python 脚本中的 Server 酱推送部分代码
# serverChan 推送信息
def sendMessage(serverChan: str, messageTitle: str, messageContent: list):
"""
:type messageContent: list[str]
"""
api = "https://sctapi.ftqq.com/%s.send" % serverChan
title = messageTitle
content = "\n".join(messageContent)
data = {
"text": title,
"desp": content
}
req = requests.post(api, data=data)
请问如何加入多通到推送参数 “channel=9|18”
谢谢!
1
mikelirjc OP 已经解决
``` # serverChan 推送信息 def sendMessage(serverChan: str, messageTitle: str, messageContent: list): """ :type messageContent: list[str] """ api = "https://sctapi.ftqq.com/%s.send" % serverChan title = messageTitle content = "\n".join(messageContent) data = { "text": title, "desp": content, "channel": "9|18" } req = requests.post(api, data=data) ``` |