Skip to main content
Question

Hi all, I need to be able to automate a changing url so it can be automatically called and downloaded.


Forum|alt.badge.img

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.

3 replies

hkingsbury
Celebrity
Forum|alt.badge.img+54
  • Celebrity
  • January 21, 2021

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


Forum|alt.badge.img
hkingsbury wrote:

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.


Forum|alt.badge.img
maryanneread wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings