Skip to content

Commit 7be267c

Browse files
committed
Add Wikipedia Configuration Example
1 parent 0fe48ac commit 7be267c

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"url": {
3+
"base_url": "https://en.wikipedia.org",
4+
"relative_url": "/wiki/List_of_largest_companies_by_revenue"
5+
},
6+
"table_selector": ".wikitable > tbody > tr",
7+
"source_name": "wikipedia",
8+
"company_info": [
9+
{
10+
"label": "company_name",
11+
"value": {
12+
"selector": "td:nth-child(2)",
13+
"type": "text"
14+
}
15+
},
16+
{
17+
"label": "industry",
18+
"value": {
19+
"selector": "td:nth-child(3)",
20+
"type": "text"
21+
}
22+
},
23+
{
24+
"label": "country",
25+
"value": {
26+
"selector": "td:nth-child(7) > a",
27+
"type": "text"
28+
}
29+
}
30+
],
31+
"metrics": [
32+
{
33+
"label": "Revenue",
34+
"value": {
35+
"selector": "td:nth-child(4)",
36+
"type": "numerical",
37+
"replace":{
38+
"regex":["^"],
39+
"with":["Millions of "]
40+
}
41+
}
42+
}
43+
],
44+
"store": {
45+
"format": "COMPANY_METRIC",
46+
"database": "WR_test_db",
47+
"companies_collection": "companies",
48+
"metrics_collection": "metrics"
49+
},
50+
"dynamic_page": false
51+
}

0 commit comments

Comments
 (0)