liftie 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
select(dom, '#trail-content > div:nth-of-type(-n + 2)').forEach(div => {
|
|
12
|
-
let name;
|
|
13
|
-
let status;
|
|
14
|
-
|
|
15
|
-
div.children.forEach(node => {
|
|
16
|
-
if (node.type === 'text') {
|
|
17
|
-
name = domutil.findText(node);
|
|
18
|
-
if (name) {
|
|
19
|
-
name = name.trim().replace(/\s+High-Speed Quad$/, '');
|
|
20
|
-
}
|
|
21
|
-
} else if (node.type === 'tag' && node.name === 'span') {
|
|
22
|
-
status = node.attribs.class || 'open';
|
|
23
|
-
if (name) {
|
|
24
|
-
liftStatus[name] = coerce(status);
|
|
25
|
-
name = undefined;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
debug('Bretton Woods Lift Status:', liftStatus);
|
|
32
|
-
return liftStatus;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export default parse;
|
|
1
|
+
export default {
|
|
2
|
+
selector: '.trail-reports__lifts .trail-reports__table-item[data-status]',
|
|
3
|
+
parse: {
|
|
4
|
+
name: '0/0',
|
|
5
|
+
status: {
|
|
6
|
+
attribute: 'data-status'
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
};
|