Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Weather forecast

May
12,845
164
Another fun project involvong TPIPE. This is a first attempt and will probably evolve. I don't know if my list of time descriptions is complete.
Code:
copy /q "http://forecast.weather.gov/MapClick.php?zoneid=NYZ018&zflg=1" t:\forecast.raw

tpipe /input=t:\forecast.raw ^
/grep=3,0,0,1,0,0,0,0,"Highs in the" ^
/simple=16 ^
/replace=4,1,0,0,0,0,0,0,0,^
    "(This Afternoon|Rest Of Today|Rest Of Tonight|Monday Night|Tuesday Night^
    |Wednesday Night|Thursday Night|Friday Night|Saturday Night|Sunday Night^
    |Today|Tonight|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday).*",^
    "\n\n\x1b[36;1m$0\x1b[0m " ^
/number=2,80 ^
> t:\forecast.txt

type t:\forecast.txt

del /q t:\forecast.*

1513362469386.png
 
How did you come up with "zoneid=NYZ018" - please? Also for "zflg=1" please.
 
How did you come up with "zoneid=NYZ018" - please? Also for "zflg=1" please.
When I tried my usual page last night, I was getting redirected there. I can't find a way to navigate there directly. My usual page is
Code:
"http://forecast.weather.gov/MapClick.php?x=166&y=67&site=bgm&zmx=&zmy=&map_x=166&map_y=67"

You can get a URL like that one by going to www.weather.gov ... FORECAST (menu) ... Local ... click your location on the map.

In the source for that page, look for a line like this:
Code:
<p class="myforecast-location"><a href="MapClick.php?zoneid=NYZ018">Zone Area Forecast for Onondaga County, NY</a></p>
 
I found a more direct way to get that URL. Once you have done the map thing (as I said earlier) there's something like
Code:
Zone Area Forecast for Onondaga County, NY
under "Additional Forecasts and Information" (at the bottom). It doesn't have the "&zflg=1"; I'm not sure if that's important.
 
Back
Top