mardi 7 août 2018

download an html page using wget with only partial link

i am writing a bash script to download current natgeo photo of the day html web page using wget, it changes everyday. When i go to link https://www.nationalgeographic.com/photography/photo-of-the-day/ it redirects me to current page that is https://www.nationalgeographic.com/photography/photo-of-the-day/2018/08/mandalay-golden-sunrise/ that part after photoof the day changes everyday in website. i want wget to download the 2nd html link (which changes everyday) using only the 1st link( which when typed in browser redirects me to the 2nd link).how can i do it?

till now i have tried:

wget  https://www.nationalgeographic.com/photography/photo-of-the-day/  

but it doesnt give me the desired 2nd link html page.

Aucun commentaire:

Enregistrer un commentaire