Skip to main content

I am wanting to automate PDF's to be downloaded on a weekly or fortnightly basis. The url changes slightly each week/fortnight: 'https://www.admiralty.co.uk/WeeklyNMs/Year%20-%202021/05wknm21_week05_2021.pdf " for example the '05wknm21_week05_2021' would change to '06wknm21_week06_2021' and so on. There is usually only 1 or 2 numbers in the urls that will change each week going up by a factor of 1. Is there a way I can automate these changes?

 

  • Note I had a different example here but that link had a redirect URL which solved the problem for that particular URL but unfortunately it was not the same for the link above.

 

Thanks in advance for any help.

Looking at the LINZ website, they have two urls (on this page https://www.linz.govt.nz/sea/maritime-safety/notices-mariners)

 

first one being the current notice: https://www.linz.govt.nz/sites/default/files/media/ntm/files/thisweek.pdf?download=1

 

and second being previous editions: https://www.linz.govt.nz/sea/maritime-safety/notices-mariners/previous-ntm-editions

 

This first url has a redirect on it to redirect to the specific latest file. So each time you want to check for a new file, you can just call the first url


Looking at the LINZ website, they have two urls (on this page https://www.linz.govt.nz/sea/maritime-safety/notices-mariners)

 

first one being the current notice: https://www.linz.govt.nz/sites/default/files/media/ntm/files/thisweek.pdf?download=1

 

and second being previous editions: https://www.linz.govt.nz/sea/maritime-safety/notices-mariners/previous-ntm-editions

 

This first url has a redirect on it to redirect to the specific latest file. So each time you want to check for a new file, you can just call the first url

Thanks for this it was really helpful.


Thanks for this it was really helpful.

I had a look at some of the other URL's I need to access from other countries and unfortunately they did not have redirect URLs. Still looking to solve the changing URL issue.


Reply