
On Thu, 10 Sep 2020, Trent W. Buck wrote:
One of the good folk of Debian Australia (I think it was Paul Wise) spotted that they now have a rain radar using OSM:
https://weather.bom.gov.au/location/r1r0fsn-melbourne
You need to enable first-party javascript to get ANY of content, not just the map, but it's a lot closer to the old m.bom.gov.au than anything else.
Also doesn't work in PrinceXML :-(
$ prince-browser --javascript https://weather.bom.gov.au/ prince: https://weather.bom.gov.au/:1: error: unexpected token reserved("const") prince: https://weather.bom.gov.au/static/js/vendors~main.4319003d.chunk.js:1: error: unexpected token identifier("patches") prince: https://weather.bom.gov.au/static/js/main.9384b51b.chunk.js:1: error: unexpected token identifier("fetchParameters")
Management are pretty keen to get rid of everything that works on the old website too. I was slightly annoyed how it took 1 second to download all the gifs on my 50mbit/s connection, so I discovered that debian's `puf` has a largely wget compatible syntax (and I didn't have to work out how to fork off dozens of python subprocesses and wait for them all). Now gm is by far the slowest invocation: diff -u -b -r1.3 radar --- radar 12 Sep 2020 06:55:46 -0000 1.3 +++ radar 12 Sep 2020 07:06:14 -0000 @@ -28,15 +28,14 @@ underlays = ('background', 'locations', 'range', 'topography') -with tempfile.TemporaryDirectory() as tempdir_str: +with tempfile.TemporaryDirectory(prefix="radar.") as tempdir_str: tempdir_path = pathlib.Path(tempdir_str) now = datetime.datetime.utcnow() # NOTE: TZ=UTC # Truncate to start of hour to kludge over with propagation delays on the bom.gov.au servers # This means the data will be up to 1h delayed, so FIXME. # now = now.replace(minute=0) subprocess.call([ - 'wget', '-nv', '-P', tempdir_path, - '--', + 'puf', '-P', tempdir_path, # Try to get a rain image for every minute in the last hour. # 1 in every 6 will work. For now, just ignore that some fail. # FIXME: this is VERY VERY VERY slow to download. Funny thing about today's 95% chance 20-40mm forecast: 95% refers to the chance of it raining more than 0.2mm (from memory), with 50% (from memory) chance of it falling between 20-40mm. Those of us north of the wet bit got our 1mm. Those of you in the south appear to have gotten your 20mm. And the Bureau were technically correct - the best form of correct! -- Tim Connors