-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.json
41 lines (41 loc) · 1 KB
/
template.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
{
"url": "https://lsa.umich.edu/cg/cg_detail.aspx?content=$$TERMID$$$$CLASS$$&termArray=$$TERMARRAY$$",
"initial_regex": ["(<span.*?>[^<]*)</b>", "\\1"],
"elements": [
{
"key": "sections",
"selector": "div.clsschedulerow>:first-child>:first-child",
"select_all": true,
"scrape": [
{
"key": "name",
"selector": ":scope>:first-child>span",
"select_all": false,
"scrape": {
"type": "text",
"regex": [" $", ""]
}
},
{
"key": "seats",
"selector": ":scope>:nth-child(5)",
"select_all": false,
"scrape": {
"type": "text_nodes",
"parse_as": "int"
}
},
{
"key": "waitlist",
"selector": ":scope>:nth-child(7)",
"select_all": false,
"scrape": {
"type": "text_nodes",
"parse_as": "int"
}
}
]
}
],
"scrape_all": false
}