Skip to content

Commit

Permalink
Commented out extraneous logging
Browse files Browse the repository at this point in the history
  • Loading branch information
duckduckgrayduck committed Jan 25, 2024
1 parent 9c2ccf2 commit 615e7d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ properties:
filter_selector:
title: Filter
type: string
description: An optional CSS selector for elements on the page that should be ignored when checking for updates.
description: (Optional) HTML elements that you want to filter out from being compared (<a>, <p>, etc).
slack_webhook:
title: Slack Webhook
type: string
Expand Down
11 changes: 6 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,14 +197,15 @@ def monitor_with_selector(self, site, selector):
new_elements = [
self.exclude_elements(el, filter_selector) for el in new_elements
]
print("-----------Old elements-----------")
print(old_elements)
print("-----------New elements-----------")
print(new_elements)
# print("-----------Old elements-----------")
# print(old_elements)
# print("-----------New elements-----------")
# print(new_elements)
print("Filter applied")
# If there are no changes detected, you do not get a notification.
if old_elements == new_elements:
print("Elements are the same as last time")
self.set_message("No changes detected on the site")
sys.exit(0)
else:
print("Elements are updated on this page")
Expand Down Expand Up @@ -232,7 +233,7 @@ def monitor_with_selector(self, site, selector):
self.store_event_data(self.site_data)
old_timestamp = self.timestamp1
changes_url = self.get_changes_url(site, old_timestamp, new_timestamp)
# rare edge case where Wayback savepagenow returns the old archive URL
# edge case where Wayback savepagenow returns the old archive URL
# usually when a site is archived in rapid succession.
if new_timestamp == old_timestamp:
print("New timestamp is the same as the old timestamp.")
Expand Down

0 comments on commit 615e7d6

Please sign in to comment.