-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Handling variables in the watched URL
dgtlmoon edited this page Oct 24, 2022
·
10 revisions
@todo update
Sometimes you need to insert the current date, this can be done following the Jinja2 template syntax, you can also use any other Jinja2 syntax (for example, if the day is a tuesday, then insert the word "foobar" or something)
https://changedetection.io/test.txt?date={% now 'Europe/Berlin', '%d' %}.{% now 'Europe/Berlin', '%m' %}.{% now 'Europe/Berlin', '%Y' %}
Would request (according to the Europe/Berlin
) timezone
https://changedetection.io/test.txt?date=24.10.2022
List of accepted timezones https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
List of date format codes (the %d
etc) https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes