From 202698f9179b081bd4214979f054e5ff7c805621 Mon Sep 17 00:00:00 2001 From: fnk93 Date: Wed, 2 Dec 2020 19:13:25 +0100 Subject: [PATCH] feat(store): add expert (#1105) --- README.md | 1 + src/store/model/expert.ts | 55 +++++++++++++++++++++++++++++++++++++++ src/store/model/index.ts | 2 ++ 3 files changed, 58 insertions(+) create mode 100644 src/store/model/expert.ts diff --git a/README.md b/README.md index 98ba79f..65cb2e7 100644 --- a/README.md +++ b/README.md @@ -183,6 +183,7 @@ environment variables are **optional**._ | Euronics (DE) | `euronics-de`| | EVGA | `evga`| | EVGA (EU) | `evga-eu`| +| Expert | `expert`| | Galaxus (DE) | `galaxus`| | Game (UK) | `game`| | Gamestop | `gamestop`| diff --git a/src/store/model/expert.ts b/src/store/model/expert.ts new file mode 100644 index 0000000..bf2d1cc --- /dev/null +++ b/src/store/model/expert.ts @@ -0,0 +1,55 @@ +import {Store} from './store'; + +export const Expert: Store = { + labels: { + inStock: [ + { + container: 'span.widget-ArticleStatus-buttonText', + text: ['In den Warenkorb'] + } + ], + maxPrice: { + container: '.widget-Container-subContent .widget-ArticlePrice-price', + euroFormat: true + }, + outOfStock: [ + { + container: + 'span[style="font-size: 14pt;"] > span[style="color: #ff5e19;"]', + text: ['Das von Ihnen ausgewählte Produkt ist ausverkauft'] + }, + { + container: 'span.widget-ArticleStatus-statusPointText', + text: ['Artikel ist derzeit nicht verfügbar'] + } + ] + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.expert.de/shop/11364114744-ps4-pro-1tb-jet-black.html' + }, + { + brand: 'sony', + model: 'ps5 console', + series: 'sonyps5c', + url: 'https://www.expert.de/shop/11364129744-playstation-r-5.html' + }, + { + brand: 'sony', + model: 'ps5 digital', + series: 'sonyps5de', + url: + 'https://www.expert.de/shop/11364133744-playstation-r-5-digital-edition.html' + }, + { + brand: 'microsoft', + model: 'xbox series s', + series: 'xboxss', + url: 'https://www.expert.de/shop/11350018530-xbox-series-s.html' + } + ], + name: 'expert' +}; diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 979a303..cb92c7c 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -41,6 +41,7 @@ import {Euronics} from './euronics'; import {EuronicsDE} from './euronics-de'; import {Evga} from './evga'; import {EvgaEu} from './evga-eu'; +import {Expert} from './expert'; import {Galaxus} from './galaxus'; import {Game} from './game'; import {Gamestop} from './gamestop'; @@ -120,6 +121,7 @@ export const storeList = new Map([ [EuronicsDE.name, EuronicsDE], [Evga.name, Evga], [EvgaEu.name, EvgaEu], + [Expert.name, Expert], [Galaxus.name, Galaxus], [Game.name, Game], [Gamestop.name, Gamestop],