User Tools

Site Tools


code:shell:weather2twitter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
code:shell:weather2twitter [2012/12/26 22:49] – created percycode:shell:weather2twitter [2016/05/05 13:07] (current) – external edit 127.0.0.1
Line 10: Line 10:
 curl -d "username=xxx&password=xxx&message=${msg}" -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus curl -d "username=xxx&password=xxx&message=${msg}" -k https://216.24.xxx.xxx:8443/HelloServlet/s1/UpdateStatus
 </code> </code>
 +
 +====== Get Weather and PM 2.5 ======
 +  weather_shanghai=`w3m -dump -no-cookie http://www.weather.com.cn/weather/101020100.shtml|grep -A 3 "查看未来"|tail -n 1|sed 's/\(\[.*\]\)//g'|sed 's/  //g'`
 +  pm=`w3m -dump -no-cookie http://www.chapm25.com/city/3#from-chrome|grep "PM2.5为"|cut -d " " -f1`
 +
 +
/var/www/dokuwiki/wiki/data/attic/code/shell/weather2twitter.1356533342.txt.gz · Last modified: 2016/05/05 13:06 (external edit)