Re #1052 - Watch 'open' link should use any dynamic/template info (#1063)

This commit is contained in:
dgtlmoon
2022-10-27 13:29:24 +02:00
committed by GitHub
parent 9874f0cbc7
commit 7f6a13ea6c
4 changed files with 13 additions and 7 deletions

View File

@@ -35,8 +35,6 @@ class perform_site_check():
def run(self, uuid):
from jinja2 import Environment
changed_detected = False
screenshot = False # as bytes
stripped_text_from_html = ""
@@ -68,9 +66,7 @@ class perform_site_check():
timeout = self.datastore.data['settings']['requests'].get('timeout')
# Jinja2 available in URLs along with https://pypi.org/project/jinja2-time/
jinja2_env = Environment(extensions=['jinja2_time.TimeExtension'])
url = str(jinja2_env.from_string(watch.get('url')).render())
url = watch.link
request_body = self.datastore.data['watching'][uuid].get('body')
request_method = self.datastore.data['watching'][uuid].get('method')