Skip to content

Commit 95918f1

Browse files
authored
Merge pull request selfteaching#1262 from daweijian/master
19100102 day12
2 parents 275c82f + 233d550 commit 95918f1

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

19100102/daweijian/mymodule/d11_training1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
recipients = input('输入收件人邮箱:')
3636

3737
try:
38-
yag=yagmail.SMTP(sender,password,'smtp.mail.qq.com')
38+
yag=yagmail.SMTP(sender,password,'smtp.qq.com')
3939
#yag.send('[email protected]','subject',strResult)
4040
yag.send(recipients,'19100102 daweijian',strResult)
4141
print("已发送,请注意查收。")
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from wxpy import Bot, embed
2+
from d11_training import request_data
3+
4+
#扫描二维码登陆微信
5+
bot = Bot()
6+
my_friend=bot.friends().search('梓森',sex=FEMALE,city='揭阳')[0]
7+
8+
my_friend.send('程序测试:转发任意微信推文给我,完成测试')
9+
10+
# 消息接收监听器
11+
@bot.register()
12+
def print_others(msg):
13+
# 输出监听到的消息
14+
print(msg)
15+
if msg.type == 'Sharing':
16+
s = request_data(msg.url)
17+
print(s)
18+
msg.reply(s)
19+
20+
21+
embed()

0 commit comments

Comments
 (0)