Open alfablend opened 1 month ago
Yes, well spotted, it needs something here https://github.com/dgtlmoon/changedetection.io/blob/d7e85ffe8ff07df469055e4051c23a5a8965899d/changedetectionio/processors/__init__.py#L136 reusing the "ValidateJinja2Template
" and executing only in a sandbox
should probably apply to headers too!
and POST for request body test updated here https://github.com/dgtlmoon/changedetection.io/blob/d7e85ffe8ff07df469055e4051c23a5a8965899d/changedetectionio/tests/test_request.py#L120
Version and OS 0.45.23 on Linux/Docker
Is your feature request related to a problem? Please describe.
Variables dont work with POST requests, only with GET requests
Describe the solution you'd like
Enable to use variables in POST requests
Describe the use-case and give concrete real-world examples
I need to set date in the body of POST request to get most recent information from the site:
DateFrom={% now 'Europe/Berlin', '%d' %}.{% now 'Europe/Berlin', '%m' %}.{% now 'Europe/Berlin', '%Y' %} DateTo={% now 'Europe/Berlin', '%d' %}.{% now 'Europe/Berlin', '%m' %}.{% now 'Europe/Berlin', '%Y' %}
But this syntax doesnt work.
Additional context I can scrape the site with webdriver, but plain requests are much more faster.