Tag Archive for 'wget'

用bash脚本更新校内状态

其实就是些模拟post操作……

昨天跟@liufeng在twitter上说研究一下那个python代码……其实我不懂python……仔细看了一下发现看不懂……还是自己用firefox+live http header模拟表单提交吧……

liufeng兄……辜负你的期望了……

我用wget搞定的,应该用curl也行,没去研究了……

登录
wget –no-proxy -O xiaoneilogin.log –post-data=”email=youremailaddr&password=yourpasswd&autoLogin=true”  –keep-session-cookies –save-cookies=xiaoneicookie http://login.xiaonei.com/Login.do

发新日志
wget –no-proxy -O xiaoneipost.log –post-data=”title=Your_blog_title&body=Your_blog_content&categoryId=0&blogControl=99&passwordProtected=0″ –load-cookies=xiaoneicookie http://blog.xiaonei.com/NewEntry.do

默认发到“默认分类”

发新状态
wget –no-proxy -O xiaoneipost.log –post-data=”c=Your_Status”  –keep-session-cookies –load-cookies=xiaoneicookie http://status.xiaonei.com/doing/update.do –referer=http://status.xiaonei.com/getdoing.do