-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamazon.json
41 lines (41 loc) · 1.91 KB
/
amazon.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
{
"name": "Amazon",
"author": {
"name": "Celso Martinho",
"email": "[email protected]"
},
"recipes": [
{
"title": "Product",
"url": "//www.amazon..*/.*",
"fields":
{
"title": "div[id=\"title_feature_div\"] span | clean | trim",
"features": [ "div[id=\"featurebullets_feature_div\"] li[class!=\"aok-hidden\"] span | clean | trim" ],
"price": "span[id=\"priceblock_ourprice\"]",
"rating": "div[data-feature-name=\"averageCustomerReviews\"] div span span | clean | trim | match:\"([0-9\\.]+) \"",
"histogram:1": {
"5star": "tr[class=\"a-histogram-row\"] a[href*=\"five_star\"] div[class=\"a-meter\"]@aria-label",
"4star": "tr[class=\"a-histogram-row\"] a[href*=\"four_star\"] div[class=\"a-meter\"]@aria-label",
"3star": "tr[class=\"a-histogram-row\"] a[href*=\"three_star\"] div[class=\"a-meter\"]@aria-label",
"2star": "tr[class=\"a-histogram-row\"] a[href*=\"two_star\"] div[class=\"a-meter\"]@aria-label",
"1star": "tr[class=\"a-histogram-row\"] a[href*=\"one_star\"] div[class=\"a-meter\"]@aria-label"
},
"histogram:2": {
"5star": "div.5star@aria-label",
"4star": "div.4star@aria-label",
"3star": "div.3star@aria-label",
"2star": "div.2star@aria-label",
"1star": "div.1star@aria-label"
},
"reviews:1": [ "div[id*=\"revData-dpReviews\"] div[class=\"a-section\"] | clean | trim" ],
"reviews:2": [ "div.review-data div[data-hook=\"review-collapsed\"] | clean | trim" ]
}
}
],
"tests": [
{
"https://www.amazon.com/dp/B000MPA044/": "obj.length > 0"
}
]
}