This repository has been archived by the owner on Sep 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschema.json
155 lines (151 loc) · 5.43 KB
/
schema.json
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
{
"type": "object",
"properties": {
"start_page": {
"type": "string",
"id": "start_page",
"default": "",
"description": "Entry point of scraping the website."
},
"start_pages": {
"type": "array",
"id": "start_pages",
"default": "",
"description": "Multiple entry point of scraping the website."
},
"regexPortal": {
"type": "string",
"id": "regexPortal",
"default": "",
"description": "Regex by which we can detect the Antragsportal"
},
"event": {
"type": "string",
"id": "event",
"default": "website",
"optional": true,
"description": "Event name of the Antragsportal to scrape."
},
"orderby": {
"type": "string",
"id": "orderby",
"required": false,
"default": "id",
"description": "Scraped results are ordered by this data field. Data field must be defined in context."
},
"stripHTML": {
"type": "boolean",
"id": "stripHTML",
"required": false,
"default": false,
"description": "Remove HTML tags from all scraped fields."
},
"contexts": {
"type": "array",
"required": true,
"minItems": 1,
"description": "Set of rules by which to scrape given a URL schema.",
"items": [
{
"type": "object",
"required": true,
"properties":
{
"start_page":
{
"type": "string",
"id": "start_page",
"optional": false
},
"regexContext":
{
"type": "string",
"id": "regexContext",
"default": "",
"optional": true,
"description": "If this regular expression matches, the visited website is part of the context."
},
"skip": {
"type": "boolean",
"id": "skip",
"default": false,
"oprtional": true,
"description": "If you want to skip a context for testing."
},
"regexMotion":
{
"type": "string",
"id": "regexMotion",
"default": "",
"optional": true,
"description": "Regular expression by which to split motion blocks within a single document body."
},
"detail":
{
"type": "boolean",
"id": "detail",
"optional": false
},
"detailUrl":
{
"type": "string",
"id": "detailUrl",
"optional": true
},
"data":
{
"type": "array",
"required": true,
"minItems": 1,
"items": [
{
"type": "object",
"required": true,
"properties":
{
"name":
{
"type": "string",
"id": "name",
"optional": false
},
"regex":
{
"type": "string",
"id": "regex",
"optional": true
},
"selector":{
"type": "string",
"id": "selector",
"optional": true
},
"value": {
"type": "string",
"id": "value",
"optional": true
},
"required":
{
"type":"boolean",
"id": "required",
"optional": true
},
"group":
{
"type": "integer",
"id": "group",
"optional": true
}
}
}
]
}
}
}
],
"additionalProperties": true
}
},
"additionalProperties": false
}