但凡一件事,稍微有些重复。我就考虑怎么样用程序来实现它。这里给各位程序员朋友分享如何每天给朋友定时微信发送”晚安“,故事,新闻,等等··· ···最好运行在服务器上,这样后台挂起来更方便。准备代码如下: #不要抄下源码就运行,你需要改动几个地方from __future__ import unicode_literalsfrom threading import Timerfrom wxpy import *import requests#bot = Bot()bot = Bot(console_qr=2,cache_path=”botoo.pkl”) #这里的二维码是用像素的形式打印出来!,如果你在win环境上运行,替换为 bot=Bot()def get_news1():#获取金山词霸每日一句,英文和翻译url = “http://open.iciba.com/dsapi/”r = requests.get(url)contents = r.json()[‘content’]translation= r.json()[‘translation’]return contents,translationdef send_n
………………………………