Categories
User Help

How to use Firefox command line to download a specific image from a website?

Server: ubuntu 18.04
I intend to automate extracting a skychart from HevenAbove website. Now I can use the following command to download the whole page.

firefox -screenshot heavenabove.png 'https://heavens-above.com/SkyChart.aspx?lat=13.71732&lng=100.5907&loc=Europa+Cafe%27+Observatory%2c+Bangkok+Thailand&alt=0&tz=UCTm7' --window-size=1920,1080

I may use imagemagick convert cli to further cut and save the skychart part. I just wonder whether there is any cleaner option to just download by specifying, say, the img id name (for my case, img id=”ctl00_cph1_imgSkyChart”); or some other option.

Thank you.

Leave an answer

Your email address will not be published. Required fields are marked *