code:shell:fetchpm25
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| code:shell:fetchpm25 [2015/01/21 05:40] – created percy | code:shell:fetchpm25 [2016/05/05 13:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Fetch the pm 2.5 for all the cities in China ====== | ====== Fetch the pm 2.5 for all the cities in China ====== | ||
| + | Get the pm 2.5 from http:// | ||
| + | |||
| + | With this script you can get all the pm 2.5 in just one file " | ||
| + | |||
| + | So have fun. | ||
| + | |||
| + | Before you can run it, you need install " | ||
| + | apt-get install dos2unix | ||
| + | |||
| < | < | ||
| Line 11: | Line 20: | ||
| OUTPUT_TMP=" | OUTPUT_TMP=" | ||
| wget http:// | wget http:// | ||
| - | ALL_URLS=`cat ${RAW_HTML}|grep " | + | ALL_URLS=`cat ${RAW_HTML}|grep " |
| ALL_CITY=`echo " | ALL_CITY=`echo " | ||
| echo " | echo " | ||
| Line 25: | Line 34: | ||
| i=" | i=" | ||
| url=`echo " | url=`echo " | ||
| - | city=`echo " | + | city=`echo " |
| pingyin=`echo " | pingyin=`echo " | ||
| #echo " | #echo " | ||
| Line 42: | Line 51: | ||
| cp ${OUTPUT} ${HISTORY}/" | cp ${OUTPUT} ${HISTORY}/" | ||
| </ | </ | ||
| + | |||
| + | I have deploy it on my vps, so you can get it from here | ||
| + | |||
| + | - http:// | ||
| + | - http:// | ||
| + | |||
/var/www/dokuwiki/wiki/data/attic/code/shell/fetchpm25.1421790007.txt.gz · Last modified: 2016/05/05 13:06 (external edit)
