diff --git a/README.md b/README.md index 0f167828..9ab279bf 100644 --- a/README.md +++ b/README.md @@ -184,9 +184,9 @@ When you enable a `json:` or `jq:` filter, you can even automatically extract an `json:$.price` or `jq:.price` would give `23.50`, or you can extract the whole structure -## Proxy configuration +## Proxy Configuration -See the wiki https://github.com/dgtlmoon/changedetection.io/wiki/Proxy-configuration +See the wiki https://github.com/dgtlmoon/changedetection.io/wiki/Proxy-configuration , we also support using [BrightData proxy services where possible]( https://github.com/dgtlmoon/changedetection.io/wiki/Proxy-configuration#brightdata-proxy-support) ## Raspberry Pi support? diff --git a/changedetectionio/download.zip b/changedetectionio/download.zip deleted file mode 100644 index b4658ada..00000000 Binary files a/changedetectionio/download.zip and /dev/null differ diff --git a/changedetectionio/fetch_site_status.py b/changedetectionio/fetch_site_status.py index 128a4e1d..646d3c57 100644 --- a/changedetectionio/fetch_site_status.py +++ b/changedetectionio/fetch_site_status.py @@ -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') diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index 61028485..a7082b46 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -90,6 +90,16 @@ class model(dict): print ("> Creating data dir {}".format(self.watch_data_dir)) os.mkdir(self.watch_data_dir) + @property + def link(self): + url = self.get('url', '') + if '{%' in url or '{{' in url: + from jinja2 import Environment + # Jinja2 available in URLs along with https://pypi.org/project/jinja2-time/ + jinja2_env = Environment(extensions=['jinja2_time.TimeExtension']) + return str(jinja2_env.from_string(url).render()) + return url + @property def label(self): # Used for sorting diff --git a/changedetectionio/static/styles/styles.scss b/changedetectionio/static/styles/styles.scss index e8b4a6ab..c2772d32 100644 --- a/changedetectionio/static/styles/styles.scss +++ b/changedetectionio/static/styles/styles.scss @@ -156,7 +156,7 @@ body:after, body:before { .fetch-error { padding-top: 1em; - font-size: 60%; + font-size: 80%; max-width: 400px; display: block; } @@ -803,4 +803,4 @@ ul { padding: 0.5rem; border-radius: 5px; color: #ff3300; -} \ No newline at end of file +} diff --git a/changedetectionio/templates/watch-overview.html b/changedetectionio/templates/watch-overview.html index 63dc44de..c7c4c45e 100644 --- a/changedetectionio/templates/watch-overview.html +++ b/changedetectionio/templates/watch-overview.html @@ -87,7 +87,7 @@