User Tools

Site Tools


code:shell:weather2twitter

This is an old revision of the document!


Weather to Twitter

#!/bin/sh
 
weather_shanghai=`w3m -dump -no-cookie http://wap.weather.com.cn/wap/weather/101020100.shtml|grep -v "^$"|grep -v "\["|head -n 5|tail -n 3|sed 's/ //g'`
msg=今日天气[上海]:${weather_shanghai}
#echo "msg=${msg}"
 
curl -d "username=xxx&password=xxx&message=${msg}" -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus

/var/www/dokuwiki/wiki/data/attic/code/shell/weather2twitter.1356533342.txt.gz · Last modified: 2016/05/05 13:06 (external edit)