mirror of
				https://github.com/dgtlmoon/changedetection.io.git
				synced 2025-10-31 14:47:21 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			update-bas
			...
			limit-hist
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | eba27dcd91 | 
| @@ -588,6 +588,8 @@ class globalSettingsApplicationForm(commonSettingsForm): | ||||
|     global_ignore_text = StringListField('Ignore Text', [ValidateListRegex()]) | ||||
|     global_subtractive_selectors = StringListField('Remove elements', [ValidateCSSJSONXPATHInput(allow_json=False)]) | ||||
|     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() | ||||
|     pager_size = IntegerField('Pager size', | ||||
|                               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_subtractive_selectors': [], | ||||
|                     '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_format': default_notification_format, | ||||
|                     'notification_title': default_notification_title, | ||||
|   | ||||
| @@ -625,6 +625,9 @@ class model(watch_base): | ||||
|             if index > 1 and os.path.isfile(filepath): | ||||
|                 os.remove(filepath) | ||||
|  | ||||
|     def post_process(self): | ||||
|  | ||||
|         x=1 | ||||
|  | ||||
|     @property | ||||
|     def get_browsersteps_available_screenshots(self): | ||||
|   | ||||
| @@ -33,6 +33,8 @@ class watch_base(dict): | ||||
|             'headers': {},  # Extra headers to send | ||||
|             '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 | ||||
|             'keep_history_n': None, # Number of snapshots to keep | ||||
|             'keep_history_seconds': None, # Or time ago back to keep | ||||
|             'include_filters': [], | ||||
|             'last_checked': 0, | ||||
|             '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>. | ||||
|                     </span> | ||||
|                 </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"> | ||||
|                                         <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> | ||||
|   | ||||
| @@ -568,6 +568,12 @@ class update_worker(threading.Thread): | ||||
|                     except Exception as e: | ||||
|                         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), | ||||
|                                                                        'last_checked': round(time.time()), | ||||
|                                                                        'check_count': count | ||||
|   | ||||
		Reference in New Issue
	
	Block a user