From 062201f092c7a271202f27e7297b8eb9d7269c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Baquedano=20Sim=C3=B3n?= <36459941+alvarobasi@users.noreply.github.com> Date: Wed, 21 Oct 2020 01:31:22 +0200 Subject: [PATCH] feat(store): Add PCComponentes and Amazon-ES Stores. (#558) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Álvaro Baquedano Co-authored-by: Álvaro Baquedano Simón --- README.md | 4 +- src/store/model/amazon-es.ts | 105 ++++++++++++++++++++++ src/store/model/index.ts | 4 + src/store/model/pccomponentes.ts | 144 +++++++++++++++++++++++++++++++ 4 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 src/store/model/amazon-es.ts create mode 100644 src/store/model/pccomponentes.ts diff --git a/README.md b/README.md index af9c8b6..4538886 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ Here is a list of variables that you can use to customize your newly copied `.en | Amazon | `amazon`| | Amazon (CA) | `amazon-ca`| | Amazon (DE) | `amazon-de`| +| Amazon (ES) | `amazon-es`| | Amazon (NL) | `amazon-nl`| | Amazon (UK) | `amazon-uk`| | Aria PC | `aria`| @@ -187,6 +188,7 @@ Here is a list of variables that you can use to customize your newly copied `.en | Nvidia (API) | `nvidia-api`| | Office Depot | `officedepot`| | Overclockers | `overclockers`| +| PCComponentes | `pccomponentes`| | PNY | `pny`| | Proshop (DE) | `proshop-de`| | Proshop (DK) | `proshop-dk`| @@ -235,7 +237,7 @@ Here is a list of variables that you can use to customize your newly copied `.en |:---:|---| | `asus` | `rog strix`, `rog strix oc`, `strix`, `tuf`, `tuf oc` | | `evga` | `ftw3`, `ftw3 ultra`, `xc3 black`, `xc3`, `xc3 ultra` | -| `gigabyte` | `aorus master`, `eagle`, `eagle oc`, `gaming`, `gaming oc`, `vision oc` | +| `gigabyte` | `aorus master`, `aorus xtreme`, `eagle`, `eagle oc`, `gaming`, `gaming oc`, `vision oc` | | `msi` | `gaming x trio`, `ventus 3x`, `ventus 3x oc` | | `nvidia` | `founders edition` | | `pny` | `dual fan`, `xlr8`, `xlr8 rgb` | diff --git a/src/store/model/amazon-es.ts b/src/store/model/amazon-es.ts new file mode 100644 index 0000000..2ddd9b1 --- /dev/null +++ b/src/store/model/amazon-es.ts @@ -0,0 +1,105 @@ +import {Store} from './store'; + +export const AmazonEs: Store = { + labels: { + captcha: { + container: 'body', + text: ['introduzca los caracteres que ve a continuación'] + }, + inStock: { + container: '#desktop_buybox', + text: ['añadir a la cesta'] + }, + maxPrice: { + container: 'span[class*="PriceString"]', + euroFormat: true + } + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.amazon.es/dp/B083JX52VG/' + }, + { + brand: 'msi', + model: 'gaming x trio', + series: '3080', + url: 'https://www.amazon.es/dp/B08HM4V2DH' + }, + { + brand: 'evga', + model: 'ftw3 ultra', + series: '3080', + url: 'https://www.amazon.es/dp/B08HGYXP4C' + }, + { + brand: 'evga', + model: 'xc3 ultra', + series: '3080', + url: 'https://www.amazon.es/dp/B08HJ9XFNM' + }, + { + brand: 'evga', + model: 'ftw3', + series: '3080', + url: 'https://www.amazon.es/dp/B08HGBYWQ6' + }, + { + brand: 'evga', + model: 'xc3', + series: '3080', + url: 'https://www.amazon.es/dp/B08HGLN78Q' + }, + { + brand: 'evga', + model: 'xc3 black', + series: '3080', + url: 'https://www.amazon.es/dp/B08HH1BMQQ' + }, + { + brand: 'gigabyte', + model: 'gaming oc', + series: '3080', + url: 'https://www.amazon.es/dp/B08HLZXHZY' + }, + { + brand: 'gigabyte', + model: 'eagle oc', + series: '3080', + url: 'https://www.amazon.es/dp/B08HHZVZ3N' + }, + { + brand: 'asus', + model: 'tuf', + series: '3080', + url: 'https://www.amazon.es/dp/B08HN37VQK' + }, + { + brand: 'asus', + model: 'tuf oc', + series: '3080', + url: 'https://www.amazon.es/dp/B08HN4DSTC' + }, + { + brand: 'asus', + model: 'rog strix oc', + series: '3080', + url: 'https://www.amazon.es/dp/B08HN6KYS3' + }, + { + brand: 'msi', + model: 'ventus 3x oc', + series: '3080', + url: 'https://www.amazon.es/dp/B08HM4M621' + }, + { + brand: 'zotac', + model: 'trinity', + series: '3080', + url: 'https://www.amazon.es/dp/B08HR1NPPQ' + } + ], + name: 'amazon-es' +}; diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 4498819..1ff45d4 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -4,6 +4,7 @@ import {AlternateNL} from './alternate-nl'; import {Amazon} from './amazon'; import {AmazonCa} from './amazon-ca'; import {AmazonDe} from './amazon-de'; +import {AmazonEs} from './amazon-es'; import {AmazonNl} from './amazon-nl'; import {AmazonUk} from './amazon-uk'; import {Aria} from './aria'; @@ -31,6 +32,7 @@ import {Nvidia} from './nvidia'; import {NvidiaApi} from './nvidia-api'; import {OfficeDepot} from './officedepot'; import {Overclockers} from './overclockers'; +import {PCComponentes} from './pccomponentes'; import {Pny} from './pny'; import {ProshopDE} from './proshop-de'; import {ProshopDK} from './proshop-dk'; @@ -48,6 +50,7 @@ const masterList = new Map([ [Amazon.name, Amazon], [AmazonCa.name, AmazonCa], [AmazonDe.name, AmazonDe], + [AmazonEs.name, AmazonEs], [AmazonNl.name, AmazonNl], [AmazonUk.name, AmazonUk], [Aria.name, Aria], @@ -75,6 +78,7 @@ const masterList = new Map([ [NvidiaApi.name, NvidiaApi], [OfficeDepot.name, OfficeDepot], [Overclockers.name, Overclockers], + [PCComponentes.name, PCComponentes], [ProshopDE.name, ProshopDE], [ProshopDK.name, ProshopDK], [Pny.name, Pny], diff --git a/src/store/model/pccomponentes.ts b/src/store/model/pccomponentes.ts new file mode 100644 index 0000000..de518fd --- /dev/null +++ b/src/store/model/pccomponentes.ts @@ -0,0 +1,144 @@ +import {Store} from './store'; + +export const PCComponentes: Store = { + labels: { + inStock: { + container: '#btnsWishAddBuy', + text: ['Comprar'] + }, + outOfStock: { + container: '#btnsWishAddBuy', + text: ['Avísame'] + } + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.pccomponentes.com/gigabyte-geforce-gtx-1660-super-oc-6gb-gddr6' + }, + { + brand: 'gigabyte', + model: 'eagle oc', + series: '3080', + url: 'https://www.pccomponentes.com/gigabyte-geforce-rtx-3080-eagle-oc-10g-10gb-gddr6x' + }, + { + brand: 'msi', + model: 'ventus 3x oc', + series: '3080', + url: 'https://www.pccomponentes.com/msi-geforce-rtx-3080-ventus-3x-oc-10gb-gddr6x' + }, + { + brand: 'asus', + model: 'tuf gaming', + series: '3080', + url: 'https://www.pccomponentes.com/asus-tuf-geforce-rtx-3080-10gb-gddr6x' + }, + { + brand: 'gigabyte', + model: 'gaming oc', + series: '3080', + url: 'https://www.pccomponentes.com/gigabyte-geforce-rtx-3080-gaming-oc-10g-10gb-gddr6x' + }, + { + brand: 'msi', + model: 'gaming x trio', + series: '3080', + url: 'https://www.pccomponentes.com/msi-geforce-rtx-3080-gaming-x-trio-10gb-gddr6x' + }, + { + brand: 'asus', + model: 'tuf oc gaming', + series: '3080', + url: 'https://www.pccomponentes.com/asus-tuf-geforce-rtx-3080-oc-10gb-gddr6x' + }, + { + brand: 'asus', + model: 'rog strix oc gaming', + series: '3080', + url: 'https://www.pccomponentes.com/asus-rog-strix-geforce-rtx-3080-10g-gaming-oc-10gb-gddr6x' + }, + { + brand: 'evga', + model: 'xc3 black gaming', + series: '3080', + url: 'https://www.pccomponentes.com/evga-geforce-rtx-3080-xc3-black-gaming-10gb-gddr6x' + }, + { + brand: 'zotac', + model: 'trinity', + series: '3080', + url: 'https://www.pccomponentes.com/zotac-gaming-geforce-rtx-3080-trinity-10gb-gddr6x' + }, + { + brand: 'evga', + model: 'xc3 ultra gaming', + series: '3080', + url: 'https://www.pccomponentes.com/evga-geforce-rtx-3080-xc3-ultra-gaming-10gb-gddr6x' + }, + { + brand: 'asus', + model: 'rog strix gaming', + series: '3080', + url: 'https://www.pccomponentes.com/asus-rog-strix-geforce-rtx-3080-gaming-10gb-gddr6x' + }, + { + brand: 'zotac', + model: 'trinity oc', + series: '3080', + url: 'https://www.pccomponentes.com/zotac-gaming-geforce-rtx-3080-trinity-oc-10gb-gddr6x' + }, + { + brand: 'gigabyte', + model: 'vision oc', + series: '3080', + url: 'https://www.pccomponentes.com/gigabyte-geforce-rtx-3080-vision-oc-10gb-gddr6x' + }, + { + brand: 'evga', + model: 'xc3 gaming', + series: '3080', + url: 'https://www.pccomponentes.com/evga-geforce-rtx-3080-xc3-gaming-10gb-gddr6x' + }, + { + brand: 'evga', + model: 'ftw3 ultra gaming', + series: '3080', + url: 'https://www.pccomponentes.com/evga-geforce-rtx-3080-ftw3-ultra-gaming-10gb-gddr6x' + }, + { + brand: 'gigabyte', + model: 'aorus master', + series: '3080', + url: 'https://www.pccomponentes.com/gigabyte-aorus-geforce-rtx-3080-master-10gb-gddr6x' + }, + { + brand: 'gigabyte', + model: 'aorus xtreme', + series: '3080', + url: 'https://www.pccomponentes.com/gigabyte-aorus-geforce-rtx-3080-xtreme-10gb-gddr6x' + }, + { + brand: 'evga', + model: 'ftw3 gaming', + series: '3080', + url: 'https://www.pccomponentes.com/evga-geforce-rtx-3080-ftw3-gaming-10gb-gddr6x' + }, + { + brand: 'pny', + model: 'xlr8 rgb', + series: '3080', + url: 'https://www.pccomponentes.com/pny-geforce-rtx-3080-xlr8-gaming-epic-x-rgb-10gb-gddr6x' + }, + { + brand: 'pny', + model: 'xlr8', + series: '3080', + url: 'https://www.pccomponentes.com/pny-geforce-rtx-3080-epic-x-rgb-triple-fan-xlr8-gaming-edition-10gb-gddr6x' + } + ], + name: 'pccomponentes' +}; +