I have previously posted a script to save Glacier webcam pictures. Since then I’ve made a few improvements and would like to describe them in this small post.
The script is here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
And my changes are:
If there is no file with the given prefix in the directory yet, the script will start with number 001.
Unfortunately the thumbnails page has stopped updating and the main webcams page is more up-to-date. Most webcam image URLs there include a timestamp, e.g. https://www.nps.gov/webcams-glac/apvccam.jpg?1606399656222. The script used to treat
jpg?1606399656222as an extension; now it’s fixed and the script properly extracts the
The script used to
echo doneat the end as a signal of completion to the user. Tridactyl puts the output into the command line, so it becomes a command prompt:
doneis not a command). Due to this feature, it’s more convenient to
echo backat the end so that Tridactyl will offer
:backas the command and you can just press
Enterto go back to the previous page! Neat.