Windows Batch Bat script query PM2.5 real-time Air quality index (AQI)

Source: Internet
Author: User

 @echo  offset  "mycity=beijing" set  "Fileutf8=%temp%\aqi. UTF8 "set " Filetmp=%temp%\aqi. TMP "set " Fileansi=%temp%\aqi. ANSI "wget -q " http://www.pm25x.com/city/%myCity%.htm " -O "%fileutf8% "sed -r "/ Rt-title/!d; s#.*<b> (. *) </b> (. *) </div>#\1 \2# " "%fileutf8% " > "% filetmp% "sed -r "/aqivalue/!d; s#.*> (. *) </div>#[pm2.5] \1# " "%fileUTF8% "  >>  "%filetmp%" sed -r  "/aqileveltext/!d; s#.*> (. *) </div>#\1#"   "% fileutf8% " >> "%filetmp% "sed "/utip/!d; s#.*utip. ##; s#</div>## " "%fileutf8% " >> "%filetmp% "powershell -c " get-content  '%filetmp% '   -encoding utf8 | out-file -encoding default   '%fileansi% ' "type "%fileansi% "Pause 

Wget.exe Sed.exe:
Http://bbs.bathome.net/s/tool/index.html

Batch Query PM2.5 real-time Air quality index (AQI)
Http://bbs.bathome.net/thread-38817-1-1.html

This article is from the "Batcher" blog, make sure to keep this source http://batcher.blog.51cto.com/11779161/1794373

Windows Batch Bat script query PM2.5 real-time Air quality index (AQI)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.