mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-16 14:36:10 +00:00
Compare commits
1 Commits
socketio-t
...
limit-hist
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eba27dcd91 |
@@ -588,6 +588,8 @@ class globalSettingsApplicationForm(commonSettingsForm):
|
|||||||
global_ignore_text = StringListField('Ignore Text', [ValidateListRegex()])
|
global_ignore_text = StringListField('Ignore Text', [ValidateListRegex()])
|
||||||
global_subtractive_selectors = StringListField('Remove elements', [ValidateCSSJSONXPATHInput(allow_json=False)])
|
global_subtractive_selectors = StringListField('Remove elements', [ValidateCSSJSONXPATHInput(allow_json=False)])
|
||||||
ignore_whitespace = BooleanField('Ignore whitespace')
|
ignore_whitespace = BooleanField('Ignore whitespace')
|
||||||
|
keep_history_n = IntegerField('Number of snapshots to keep in history for each watch')
|
||||||
|
keep_history_seconds = IntegerField('Number of snapshots to keep - maximum age (todo/seconds)')
|
||||||
password = SaltyPasswordField()
|
password = SaltyPasswordField()
|
||||||
pager_size = IntegerField('Pager size',
|
pager_size = IntegerField('Pager size',
|
||||||
render_kw={"style": "width: 5em;"},
|
render_kw={"style": "width: 5em;"},
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ class model(dict):
|
|||||||
'global_ignore_text': [], # List of text to ignore when calculating the comparison checksum
|
'global_ignore_text': [], # List of text to ignore when calculating the comparison checksum
|
||||||
'global_subtractive_selectors': [],
|
'global_subtractive_selectors': [],
|
||||||
'ignore_whitespace': True,
|
'ignore_whitespace': True,
|
||||||
|
'keep_history_n': None, # Number of snapshots to keep
|
||||||
|
'keep_history_seconds': None, # Or time ago back to keep
|
||||||
'notification_body': default_notification_body,
|
'notification_body': default_notification_body,
|
||||||
'notification_format': default_notification_format,
|
'notification_format': default_notification_format,
|
||||||
'notification_title': default_notification_title,
|
'notification_title': default_notification_title,
|
||||||
|
|||||||
@@ -625,6 +625,9 @@ class model(watch_base):
|
|||||||
if index > 1 and os.path.isfile(filepath):
|
if index > 1 and os.path.isfile(filepath):
|
||||||
os.remove(filepath)
|
os.remove(filepath)
|
||||||
|
|
||||||
|
def post_process(self):
|
||||||
|
|
||||||
|
x=1
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def get_browsersteps_available_screenshots(self):
|
def get_browsersteps_available_screenshots(self):
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ class watch_base(dict):
|
|||||||
'headers': {}, # Extra headers to send
|
'headers': {}, # Extra headers to send
|
||||||
'ignore_text': [], # List of text to ignore when calculating the comparison checksum
|
'ignore_text': [], # List of text to ignore when calculating the comparison checksum
|
||||||
'in_stock_only': True, # Only trigger change on going to instock from out-of-stock
|
'in_stock_only': True, # Only trigger change on going to instock from out-of-stock
|
||||||
|
'keep_history_n': None, # Number of snapshots to keep
|
||||||
|
'keep_history_seconds': None, # Or time ago back to keep
|
||||||
'include_filters': [],
|
'include_filters': [],
|
||||||
'last_checked': 0,
|
'last_checked': 0,
|
||||||
'last_error': False,
|
'last_error': False,
|
||||||
|
|||||||
@@ -129,6 +129,13 @@
|
|||||||
Note: Simply changing the User-Agent often does not defeat anti-robot technologies, it's important to consider <a href="https://changedetection.io/tutorial/what-are-main-types-anti-robot-mechanisms">all of the ways that the browser is detected</a>.
|
Note: Simply changing the User-Agent often does not defeat anti-robot technologies, it's important to consider <a href="https://changedetection.io/tutorial/what-are-main-types-anti-robot-mechanisms">all of the ways that the browser is detected</a>.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
|
{{ render_field(form.application.form.keep_history_n) }}
|
||||||
|
<span class="pure-form-message-inline">Blank - keep all</span>
|
||||||
|
{{ render_field(form.application.form.keep_history_seconds) }}
|
||||||
|
<span class="pure-form-message-inline">Blank - keep all</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
<br>
|
<br>
|
||||||
Tip: <a href="https://github.com/dgtlmoon/changedetection.io/wiki/Proxy-configuration#brightdata-proxy-support">Connect using Bright Data and Oxylabs Proxies, find out more here.</a>
|
Tip: <a href="https://github.com/dgtlmoon/changedetection.io/wiki/Proxy-configuration#brightdata-proxy-support">Connect using Bright Data and Oxylabs Proxies, find out more here.</a>
|
||||||
|
|||||||
@@ -568,6 +568,12 @@ class update_worker(threading.Thread):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
watch.post_process()
|
||||||
|
except Exception as e:
|
||||||
|
logger.critical(e)
|
||||||
|
|
||||||
|
|
||||||
self.datastore.update_watch(uuid=uuid, update_obj={'fetch_time': round(time.time() - now, 3),
|
self.datastore.update_watch(uuid=uuid, update_obj={'fetch_time': round(time.time() - now, 3),
|
||||||
'last_checked': round(time.time()),
|
'last_checked': round(time.time()),
|
||||||
'check_count': count
|
'check_count': count
|
||||||
|
|||||||
Reference in New Issue
Block a user