-
Notifications
You must be signed in to change notification settings - Fork 3
/
templates.js
129 lines (129 loc) · 2.83 KB
/
templates.js
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
exports = module.exports = [{
"active": true,
"type": "feed",
"name": "TechCrunch",
"url": "http://feeds.feedburner.com/TechCrunch//",
"template": {
"elements": [{
"name": "guid",
"type": "url",
"required": true,
"items": [{
"selector": "guid"
}, {
"selector": "link"
}, {
"selector": "title",
"decode": true
}]
}, {
"name": "title",
"required": true,
"items": [{
"selector": "title",
"decode": true
}]
}, {
"name": "url",
"type": "url",
"required": true,
"items": [{
"selector": "link"
}]
}, {
"name": "image",
"type": "url",
"items": [{
"selector": "enclosures[0].url"
}],
"fallback": "https://s0.wp.com/wp-content/themes/vip/techcrunch-2013/assets/images/logo.svg"
}]
}
}, {
"active": true,
"type": "json",
"name": "Mashable",
"url": "http://mashable.com/stories.json?hot_per_page=0&new_per_page=30&rising_per_page=0",
"listref": "new",
"template": {
"elements": [{
"name": "guid",
"type": "url",
"required": true,
"items": [{
"selector": "link"
}]
}, {
"name": "title",
"required": true,
"items": [{
"selector": "title"
}]
}, {
"name": "url",
"type": "url",
"required": true,
"items": [{
"selector": "link"
}]
}, {
"name": "image",
"type": "url",
"items": [{
"selector": "responsive_images[1].image"
}, {
"selector": "responsive_images[0].image"
}],
"fallback": "http://rack.1.mshcdn.com/assets/header_share_logo.v2-11a2e0632ddb46b143c85e63f590734d.png"
}]
}
}, {
"active": true,
"type": "site",
"name": "New Yorker",
"url": "http://www.newyorker.com/",
"format": "desktop",
"template": {
"containers": [{
"selector": "article",
"elements": [{
"name": "guid",
"type": "url",
"occurence": "first",
"required": true,
"items": [{
"selector": "section h2 a",
"attribute": "href"
}]
}, {
"name": "url",
"type": "url",
"occurence": "first",
"required": true,
"items": [{
"selector": "section h2 a",
"attribute": "href"
}]
}, {
"name": "title",
"required": true,
"occurence": "first",
"items": [{
"selector": "section h2 a"
}]
}, {
"name": "image",
"type": "url",
"occurence": "first",
"fallback": null,
"items": [{
"selector": "figure a img",
"attribute": "src"
}, {
"selector": "figure a img",
"attribute": "data-lazy-src"
}]
}]
}]
}
}];