From 728c4fdef0d38b7846e8daac5c01320077506cea Mon Sep 17 00:00:00 2001 From: Federico Zivolo Date: Thu, 2 Nov 2023 10:58:03 +0100 Subject: [PATCH] feat: valdisere --- lib/resorts/valdisere/index.js | 19 + lib/resorts/valdisere/resort.json | 15 + test/resorts/example/valdisere.html | 3080 +++++++++++++++++++++++++++ test/resorts/valdisere.js | 42 + 4 files changed, 3156 insertions(+) create mode 100644 lib/resorts/valdisere/index.js create mode 100644 lib/resorts/valdisere/resort.json create mode 100644 test/resorts/example/valdisere.html create mode 100644 test/resorts/valdisere.js diff --git a/lib/resorts/valdisere/index.js b/lib/resorts/valdisere/index.js new file mode 100644 index 00000000..e6c1eb2f --- /dev/null +++ b/lib/resorts/valdisere/index.js @@ -0,0 +1,19 @@ +module.exports = { + selector: + '.lift-status-pop-in:contains(Lifts) + .lifts-and-trails-subsection .lift-status-datum', + parse: { + name: '1', + status: { + child: '2/0/1', + attribute: 'fill', + fn: (s) => { + switch (s) { + case '#1ABC9C': + return 'open'; + case '#ED2559': + return 'closed'; + } + }, + }, + }, +}; diff --git a/lib/resorts/valdisere/resort.json b/lib/resorts/valdisere/resort.json new file mode 100644 index 00000000..6ac4a421 --- /dev/null +++ b/lib/resorts/valdisere/resort.json @@ -0,0 +1,15 @@ +{ + "name": "Val d'Isere", + "url": { + "host": "https://www.seevaldisere.com", + "pathname": "/lifts/status" + }, + "tags": [ + "France", + "Alps" + ], + "ll": [ + 6.97732, + 45.44627 + ] +} \ No newline at end of file diff --git a/test/resorts/example/valdisere.html b/test/resorts/example/valdisere.html new file mode 100644 index 00000000..197e6fee --- /dev/null +++ b/test/resorts/example/valdisere.html @@ -0,0 +1,3080 @@ + + + + + + + + Lift status Val d'Isere + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to main content + +
+
+ + + +SeeValdIsere + + + + + + + + + + +
+ +
+ + +
+
+ + + +
+ +
+

Lift status Val d'Isere

+

Discover the latest Val d'Isere lift and piste openings

+ +
+ + + Updated + + + + + +
+ +
+
+ +
+
+ + + +
+ + + +

Current Weather Conditions

+

Updated 2 November 2023 at 09:03

+ + + +
    +
  • + +
  • +
  • + +
  • +
+ +
+ +
+
+ + + + + + + + + + +
+ +
Morning
+ +
+ 0°C +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
Afternoon
+ +
+ 2°C +
+ + +
+
+
+ + + + + + + + + + + + + + + +
+ +
South
+ +
+ 19 km/h +
+ + +
+ + +
+
+ + + + + + + + + +
+ +
Snow Depth
+ +
+ Cm +
+ +
N/A
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
+ +
Last Snowfall
+ +
+ 17cm +
+ + +
+ +
+ +
+ + +
+ + + +

Lifts & Trails

+

Updated 2 November 2023 at 09:03

+ + + + +
+ +
+
+ prl_tc_black_none +
+ +
Lifts
+ +
+ 0/38 +
+ + +
+
+
+ + + + +Fichier 1 + + + + + +
+ +
Not available
+ +
+ 0/1 +
+ + +
+ +
+
+ + +
+ + + + + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+ +
+

Lifts

+
+ +
+
+ prl_funi_black_none +
+ +
Funival
+ +
+ + + + + +
+ + +
+
+
+ prl_tph_black_none +
+ +
Tph Olympique
+ +
+ + + + + +
+ + +
+
+
+ prl_tc_black_none +
+ +
Tc Daille
+ +
+ + + + + +
+ + +
+
+
+ prl_tsd_black_none +
+ +
Tsd Bellevarde
+ +
+ + + + + +
+ + +
+
+
+ prl_tsd_black_none +
+ +
Tsd Borsat
+ +
+ + + + + +
+ + +
+
+
+ prl_tsd_black_none +
+ +
Tsd Loyes
+ +
+ + + + + +
+ + +
+
+
+ prl_tsd_black_none +
+ +
Tsd Marmottes
+ +
+ + + + + +
+ + +
+
+
+ prl_ts_black_none +
+ +
Ts Fontaine
+ +
+ + + + + +
+ + +
+
+
+ prl_ts_black_none +
+ +
Ts Grand Pre
+ +
+ + + + + +
+ + +
+
+
+ prl_ts_black_none +
+ +
Ts Mont Blanc
+ +
+ + + + + +
+ + +
+
+
+ prl_tk_black_none +
+ +
Tk Lanches
+ +
+ + + + + +
+ + +
+
+
+ prl_tk_black_none +
+ +
Tk Slalom
+ +
+ + + + + +
+ + +
+
+
+ prl_tk_black_none +
+ +
Tk Snowpark
+ +
+ + + + + +
+ + +
+
+
+ prl_tapis_black_none +
+ +
Tapis Carpe Diem
+ +
+ + + + + +
+ + +
+ +
+

Trails and activities

+
+ +
+
+ prl_dh_black_none_250 +
+ +
Popeye (12.8 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_dh_black_none_250 +
+ +
Blue Lagoon (3.5 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_dh_black_none_250 +
+ +
Val Bleue (7 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_dh_black_none_250 +
+ +
Fast Wood (1.5 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_dh_black_none_250 +
+ +
Tabasco
+ +
+ + + + + +
+ + +
+
+
+ prl_dh_black_none_250 +
+ +
Bellev'hard (4.8 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_enduro_black_none_250 +
+ +
Rock'n Ride (5 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_enduro_black_none_250 +
+ +
Very Bike Trip (6.5 Km)
+ +
+ + + + + +
+ + +
+
+
+ prl_xc_black_none_250 +
+ +
Triffol Up
+ +
+ + + + + +
+ + +
+
+
+ prl_xc_black_none_250 +
+ +
Into The Wild Rouge (8 Km)
+ +
+ + + + + +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
First Ride
+ +
+ + + + + +
+ + +
+ +
+
+ + + + + +
+
+
+
+ +
+
+ + + + +
+ +
+ +
+ +
+ + +
+ +
+ + + + +
+ +
+ + +
+ + + + + +
+ + + + + + + diff --git a/test/resorts/valdisere.js b/test/resorts/valdisere.js new file mode 100644 index 00000000..03e9d4c4 --- /dev/null +++ b/test/resorts/valdisere.js @@ -0,0 +1,42 @@ +const lifts = require('../lifts'); + +lifts('valdisere', 'html', { + Funival: 'open', + 'Tph Olympique': 'closed', + 'Tc Daille': 'closed', + 'Tsd Bellevarde': 'closed', + 'Tsd Borsat': 'closed', + 'Tsd Loyes': 'closed', + 'Tsd Marmottes': 'closed', + 'Ts Fontaine': 'closed', + 'Ts Grand Pre': 'closed', + 'Ts Mont Blanc': 'closed', + 'Tk Lanches': 'closed', + 'Tk Slalom': 'closed', + 'Tk Snowpark': 'closed', + 'Tapis Carpe Diem': 'closed', + 'Tph Fornet': 'closed', + 'Tc Vallon': 'closed', + 'Tsd Laisinant': 'closed', + 'Tsd Pyramides': 'closed', + 'Tk Col': 'closed', + 'Tk Signal': 'closed', + 'Tsd Cascades': 'closed', + 'Ts Cema': 'closed', + 'Tk Montets': 'closed', + 'Tk Pays Desert': 'closed', + 'Tc Solaise': 'closed', + 'Tsd Glacier': 'closed', + 'Tsd Leissieres': 'closed', + 'Tsd Madeleine': 'closed', + 'Tsd Manchet': 'closed', + 'Ts Cugnai': 'closed', + 'Ts Datcha': 'closed', + 'Ts Rogoney': 'closed', + 'Ts Village': 'closed', + 'Tk 3000': 'closed', + 'Tk Legettaz': 'closed', + 'Tk Savonette': 'closed', + 'Tapis Pim Pam': 'closed', + 'Tapis Poum': 'closed', +});