This commit is contained in:
hackrobot
2024-03-07 08:22:34 +08:00
parent 8a9b8cd012
commit 7ec14bd4b5

44
main.py
View File

@@ -45,7 +45,7 @@ async def root():
}
# 网址返回wxid以及时间戳
mag = {
msg = {
"title:":
'标题',
"text":
@@ -57,6 +57,7 @@ async def root():
"icon_url":
"https://www.hackrobot.cn/wp-content/uploads/2023/05/cropped-Screenshot-2023-05-22-at-17.26.38-32x32.png"
}
# link卡片链接
link = {
'event': 'SendLinkMsg',
'robot_wxid': 'wxid_haqoszjheyuz22',
@@ -66,52 +67,13 @@ async def root():
'final_from_wxid': 'wxid_haqoszjheyuz22',
'final_from_name': '',
'to_wxid': 'wxid_4413224132412',
'msg': mag
'msg': msg
}
# r = requests.post("http://192.168.31.25:8090", data=payload)
# r = requests.post("http://192.168.31.25:8090", json=payload)
# 获取好友列表
getinfo = {'event': 'GetFriendList', 'robot_wxid': 'wxid_haqoszjheyuz22'}
xmllink = {
'event':
'SendTextMsg',
'robot_wxid':
'wxid_haqoszjheyuz22',
'robot_name':
'',
'type':
49,
'from_wxid':
'wxid_haqoszjheyuz22',
'from_name':
'',
'final_from_wxid':
'wxid_haqoszjheyuz22',
'final_from_name':
'',
'to_wxid':
'wxid_4413224132412',
'msgid':
'894964783959555477',
'msg':
'''<msg>\r\n <fromusername>wxid_haqoszjheyuz22</fromusername>\r\n <scene>0</scene>\r\n <commenturl></commenturl>\r\n <appmsg appid="" sdkver="0">\r\n <title></title>\r\n <des>活动小助手</des>\r\n <action>view</action>\r\n <type>5</type>\r\n <showtype
>0</showtype>\r\n <content></content>\r\n <url>https://hackrobot.cn</url>\r\n <dataurl></dataurl>\r\n <lowurl></lowurl>\r\n <lowdataurl></lowdataurl>\r\n <recorditem>\r\n <![CDATA[]]>\r\n </recorditem>\r\n <thumburl>https://aiimg.hackrobot.cn/1698288150.2901459.png</thumburl>\r\n
<messageaction></messageaction>\r\n <extinfo></extinfo>\r\n <sourceusername></sourceusername>\r\n
<sourcedisplayname></sourcedisplayname>\r\n <commenturl></commenturl>\r\n <appattach>\r\n
<totallen>0</totallen>\r\n <attachid></attachid>\r\n <emoticonmd5></emoticonmd5>\r\n
<fileext></fileext>\r\n <aeskey></aeskey>\r\n </appattach>\r\n <weappinfo>\r\n
<pagepath></pagepath>\r\n <username></username>\r\n <appid></appid>\r\n <appservicetype>0</appservicetype>\r\n </weappinfo>\r\n <websearch />\r\n </appmsg>\r\n <appinfo>\r\n
<version>1</version>\r\n <appname>Window wechat</appname>\r\n </appinfo>\r\n</msg>\r\n'''
}
file = {
'event': 'SendFileMsg',
'robot_wxid': 'wxid_haqoszjheyuz22',
'to_wxid': 'wxid_4413224132412',
'msg': 'C:\\Users\\Administrator\\Documents\\Applet\\static\\.mp3'
}
r = requests.post("http://192.168.31.42:8090", data=json.dumps(link))
print('item')