Implement micro-channel push Gadget Server sauce

Server sauce
is a good thing, before I always want to use smtp server configuration but found especially troublesome
record in the blog
first step:
Github bind
Step two:
micro-channel scan code binding
third step:
get key
fourth step :
just write a function to

def push(SCKEY,msg):
    if SCKEY.isspace() or len(SCKEY)==0:
        return
    else:
        api = 'https://sc.ftqq.com/'+SCKEY+'.send'
        title = u"哇哦!"
        content = '哇哦哇哦 '+msg
        data = {
           "text":title,
           "desp":content
        }
        req = requests.post(api,data = data)
Published 82 original articles · won praise 235 · Views 1.08 million +

Guess you like

Origin blog.csdn.net/solitudi/article/details/105225848