-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.toml
38 lines (37 loc) · 1.39 KB
/
config.example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[[scrapers]]
# The name really doesn't need to be set
# However, it makes for cleaner logs and notifications
name = "Example Scraper"
interval = 60
url = "https://example.com"
css_selector = "h1"
# scroll_to_bottom attempts to scroll to the bottom of the page until the css_selector is found or the end is reached
scroll_to_bottom = true
# The number of seconds to wait between scrolling (if scroll_to_bottom is enabled) or, if scroll_to_bottom is false, the number of seconds to wait before attempting to find element
pause_time = 10
notifiers = [
{type = "webhook", config = {
url = "https://example.com/webhook",
# Slack, for example, uses "text" as the key for the message
# Discord uses "content"
# Check the documentation of the service you are using
content_field = "text",
notify_on = ["change", "first_scrape", "no_change", "error"]
}}
]
[[scrapers]]
interval = 60
url = "https://example.com"
css_selector = "body > div > p:nth-child(2)"
notifiers = [
{type = "ntfy", config = {
# Ntfy can be self-hosted easily
# Their free tier on their hosted service works fine, but their paid plan seems to include some cool features
url="https://ntfy.sh/example-scraper",
# For information on the parameters, see https://docs.ntfy.sh/publish/
notify_on = ["change", "first_scrape", "error", "no_change"],
on_click = "https://example.com",
priority = 3,
tags = "+1"
}}
]