Skip to content

Commit a393b5a

Browse files
committed
add obligatory hackernews example job spec
1 parent aad49da commit a393b5a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

example/hn.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"request": {
3+
"url": "https://news.ycombinator.com",
4+
"method": "GET"
5+
},
6+
"rules": [
7+
{
8+
"name": "title",
9+
"xpath": "//td[@class=\"title\"]/a[@class=\"storylink\"]/text()"
10+
},
11+
{
12+
"name": "link",
13+
"xpath": "//td[@class=\"title\"]/a[@class=\"storylink\"]/@href"
14+
},
15+
{
16+
"name": "posted",
17+
"xpath": "//td[@class=\"subtext\"]/span[@class=\"age\"]/a/text()"
18+
},
19+
{
20+
"name": "points",
21+
"xpath": "//td[@class=\"subtext\"]/span[@class=\"score\"]/text()",
22+
"filters": [
23+
{
24+
"find": "(?s)^.*?(\\d+)\\s+points.*?$",
25+
"replace": "$1"
26+
}
27+
]
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)