-
Notifications
You must be signed in to change notification settings - Fork 4
/
config-template.yml
55 lines (55 loc) · 1.78 KB
/
config-template.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
scrapers:
- name: SourceName
url: https://url.to/events
item: "<event-selector>"
fields:
# static
- name: "location"
value: "LocationName" # This field can also be a dynamic field, if a website serves info about different event locations.
- name: "city"
value: "City"
- name: "type"
value: "concert"
- name: "sourceUrl" # This is needed to uniquely identify this scraper
value: "https://url.to/events"
# dynamic
- name: "title"
location:
selector: "<title-selector>"
- name: "url"
type: "url"
location:
selector: "<url-selector>"
- name: "comment"
on_subpage: "url" # in this case the comment can be found on the subpage defined by the 'url' field
location:
selector: "<comment-selector>"
max_length: 200 # optional
can_be_empty: true # optional
- name: "date"
type: "date"
on_subpage: "url"
components:
- covers:
day: true
month: true
year: true
time: true
location:
selector: "<datetime-selector>"
layout: ["Monday, 2. January 2006, 15:04 Uhr "] # adapt according to actual format
date_location: "Europe/Berlin" # example
date_language: "de_DE" # example
# hidden fields can be used to filter events, as in this case.
- name: "event-status"
hide: true
can_be_empty: true
location:
selector: "<event-status-selector>"
filters:
- field: "event-status"
exp: "Abgesagt"
match: false # this means that matching events will be removed.
- field: "event-status"
exp: "Verschoben.*"
match: false