Created
May 21, 2014 09:18
-
-
Save laomo/c328834f23b26088b280 to your computer and use it in GitHub Desktop.
一个利用飞信给自己发消息的脚本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*-coding: utf-8 -*- | |
#!/usr/bin/python | |
import requests | |
def sendMsg(msg): | |
url_space_login = 'http://f.10086.cn/huc/user/space/login.do?m=submit&fr=space' | |
url_login = 'http://f.10086.cn/im/login/cklogin.action' | |
url_sendmsg = 'http://f.10086.cn/im/user/sendMsgToMyselfs.action' | |
parameter= { 'mobilenum':'yourmobile', 'password':'yourpassword'} | |
session = requests.Session() | |
session.post(url_space_login, data = parameter) | |
session.get(url_login) | |
session.post(url_sendmsg, data = {'msg':msg}) | |
print 'send success !' | |
if __name__ == '__main__': | |
sendMsg('python send fetion') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment