Skip to main content
Question

I want to be able to retrieve a PDF from an open access website on a weekly basis.

  • December 17, 2020
  • 1 reply
  • 13 views

Forum|alt.badge.img

 I have been able to do this using the HTTP caller. The issue I have is the the URL that I am calling changes slightly each week. The number in the URL increases by one each week. Is there a way I can automate the change in the URL so that it will retrive the up to date document from the link?

 

Thanks in advance for any assistance.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • 8392 replies
  • December 17, 2020

You can use the DateTimeStamper to first get todays date. Then use the DateTimeConverter with either of the following output formats to get the week number:

%U for Sunday-based week numbers

%W for Monday-based week numbers

Interestingly it seems that the FME week numbers are 0-based, so you may want to use e.g. an ExpressionEvaluator to add 1 to the result.

You can then integrate the resulting week number into the URL.

 

@mark2atsafe​ @lenaatsafe​ Does it make sense that the week numbers start with 0? And what should be the week number for 20210101? According to Google it's 53, but the DateTimeConverter returns 0.