forked from pierre-aurele-martin/Algolia4you
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.json
84 lines (84 loc) · 2.55 KB
/
config.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
{
"woocommerce": {
"detect": [
"//meta[@name=\"generator\"][contains(@content, \"WooCommerce\")]",
"//link[@id=\"woocommerce-css\"]"
],
"categories":{
"url": "/product_cat-sitemap.xml"
},
"products": {
"product" : [
"//*[contains(concat(' ', normalize-space(@class), ' '), ' product ')]/a/@href"
],
"paging" : "/page/{i}/"
},
"product":{
"name": [
"(//h1)[1]/text()"
],
"description": [
"//*[@id=\"tab-description\"]//text()",
"//*[@class=\"product-info\"]//p//text()",
"//*[@class=\"woocommerce-product-details__short-description\"]//*[@class=\"wpb_wrapper\"]//text()"
],
"brand": [
"(//meta[@property=\"og:site_name\"])[1]//@content",
"(//meta[@property=\"og:title\"])[1]//@content"
],
"categories": false,
"hierarchicalCategories": false,
"price": [
"(//*[@class=\"price\"])[1]//text()"
],
"image": [
"(//meta[@property=\"og:image\" and @content != ''])[1]/@content",
"//*[@itemprop=\"image\"][1]//@href"
],
"url": false,
"popularity": false,
"rating": false
}
},
"shopify": {
"detect": [
"//meta[@name=\"shopify-checkout-api-token\"]"
],
"categories":{
"url": "/sitemap_collections_1.xml"
},
"products": {
"product" : [
"//div[@id=\"main\"]//*[contains(concat(' ', normalize-space(@class), ' '), ' collection') or contains(concat(' ', normalize-space(@id), ' '), ' collection')]//a/@href",
"//div[contains(concat(' ', normalize-space(@class), ' '), ' main ')]//a/@href",
"//div[@class=\"product-grid-item\"]/a/@href"
],
"paging" : "?page={i}/"
},
"product":{
"name": [
"(//h1)[1]//text()",
"(//h4)[1]//text()"
],
"description": [
"//*[@itemprop=\"description\"]//text()",
"//*[contains(concat(' ', normalize-space(@class), ' '), 'description')]//text()"
],
"brand": [
"(//meta[@property=\"og:site_name\"])[1]//@content"
],
"categories": false,
"hierarchicalCategories": false,
"price": [
"(//*[@itemprop=\"price\"])[1]/@content",
"(//*[@class=\"price\"])[1]//text()"
],
"image": [
"(//meta[@property=\"og:image\" and @content != ''])[1]/@content"
],
"url": false,
"popularity": false,
"rating": false
}
}
}