1. 因为微信接收企业微信消息不支持markdown格式,故改为text模式发送,可能显示未markdown源码

This commit is contained in:
ngfchl
2022-08-30 17:02:16 +08:00
parent 723b3813f0
commit 2d08ef340e
3 changed files with 6 additions and 3 deletions

2
.idea/misc.xml generated
View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (pt_assist)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (ptools)" project-jdk-type="Python SDK" />
</project>

2
.idea/ptools.iml generated
View File

@@ -17,7 +17,7 @@
<excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/db" />
</content>
<orderEntry type="jdk" jdkName="Python 3.9 (pt_assist)" jdkType="Python SDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">

View File

@@ -118,7 +118,10 @@ class PtSpider:
corp_id=notify.corpid,
secret=notify.corpsecret,
agent_id=notify.agentid, )
res = notify_push.send_markdown(text)
res = notify_push.send_text(
text=text,
to_uid=notify.touser if notify.touser else '@all'
)
print(res)