From beee35556376056b31d6719fb090ce58b7ea985f Mon Sep 17 00:00:00 2001 From: KnotenJoe <76251911+KnotenJoe@users.noreply.github.com> Date: Mon, 21 Dec 2020 18:58:46 +0100 Subject: [PATCH] feat(store): add pcking and acompc (#1470) * Create pcking Another store for Germany. I tested the code on my pc. * docs: add pcking to store list * Rename pcking to pcking.ts * Update index.ts * Update filter.md * Update index.ts * Create acompc.ts * chore: linting * chore: linting Co-authored-by: Jef LeCompte --- docs/reference/filter.md | 2 + src/store/model/acompc.ts | 234 ++++++++++++++++++++++++++++++++++++++ src/store/model/index.ts | 4 + src/store/model/pcking.ts | 213 ++++++++++++++++++++++++++++++++++ 4 files changed, 453 insertions(+) create mode 100644 src/store/model/acompc.ts create mode 100644 src/store/model/pcking.ts diff --git a/docs/reference/filter.md b/docs/reference/filter.md index b80b03f4cc..854528fc73 100644 --- a/docs/reference/filter.md +++ b/docs/reference/filter.md @@ -33,6 +33,7 @@ Used with the `STORES` variable. | Stores | Country | Environment variable | |---|---|---| +| AComPC | DE | `acompc` | | Adorama | US | `adorama`| | Alternate | DE | `alternate`| | Alternate | NL | `alternate-nl`| @@ -111,6 +112,7 @@ Used with the `STORES` variable. | Overclockers | UK | `overclockers`| | PCCG | AU | `pccg`| | PCComponentes | ES | `pccomponentes`| +| PCKing | DE | `pcking` | | PlayStation | US | `playstation`| | PNY | US | `pny`| | Proshop | DE | `proshop-de`| diff --git a/src/store/model/acompc.ts b/src/store/model/acompc.ts new file mode 100644 index 0000000000..f3dbd08e47 --- /dev/null +++ b/src/store/model/acompc.ts @@ -0,0 +1,234 @@ +import {Store} from './store'; + +export const AComPC: Store = { + currency: '€', + labels: { + inStock: { + container: '.filial_stock', + text: ['lagernd', 'im Zulauf'] + }, + maxPrice: { + container: '.price', + euroFormat: true + }, + outOfStock: [ + { + container: '.stockStatus', + text: ['nicht lieferbar'] + } + ] + }, + links: [ + { + brand: 'asus', + model: 'strix', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-ROG-STRIX-RTX3080-10G-GAMING-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-2-x-HDMI-3-x-DisplayPort.html' + }, + { + brand: 'asus', + model: 'strix oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-ROG-STRIX-RTX3080-O10G-GAMING-OC-Edition-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-2-x-HDMI-3-x-DisplayPort.html' + }, + { + brand: 'asus', + model: 'tuf', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-TUF-Gaming-GeForce-RTX-3080-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'asus', + model: 'tuf oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-TUF-Gaming-GeForce-RTX-3080-OC-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'gigabyte', + model: 'aorus master', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-AORUS-GeForce-RTX-3080-MASTER-10G-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-3-x-DisplayPort-3-x-HDMI.html' + }, + { + brand: 'gigabyte', + model: 'aorus xtreme', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-AORUS-GeForce-RTX-3080-XTREME-10G-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-3-x-DisplayPort-3-x-HDMI.html' + }, + { + brand: 'gigabyte', + model: 'eagle oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-GeForce-RTX-3080-Eagle-OC-10G-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'gigabyte', + model: 'eagle', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-GeForce-RTX-3080-Eagle-10G-Grafikkarte-10.240-MB.html' + }, + { + brand: 'gigabyte', + model: 'gaming oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-GeForce-RTX-3080-GAMING-OC-10G-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'gigabyte', + model: 'vision oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-GeForce-RTX-3080-Vision-OC-10G-Grafikkarten-GF-RTX-3080-10GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DP-weiss.html' + }, + { + brand: 'inno3d', + model: 'twin x2 oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Inno3D-GeForce-RTX-3080-Twin-X2-OC-Grafikkarten-GF-RTX-3080-10-GB-GDDR6-PCIe-4.0-x16-HDMI-3x-DisplayPort.html' + }, + { + brand: 'msi', + model: 'gaming x trio', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/MSI-GeForce-RTX-3080-Gaming-X-Trio-10G-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-HDMI-3x-DisplayPort.html' + }, + { + brand: 'msi', + model: 'ventus 3x oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/MSI-GeForce-RTX-3080-Ventus-3X-10G-OC-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-x16-HDMI-3x-DisplayPort.html' + }, + { + brand: 'zotac', + model: 'amp holo', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ZOTAC-GAMING-GeForce-RTX-3080-AMP-Holo-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-HDMI-3-x-DisplayPort.html' + }, + { + brand: 'zotac', + model: 'trinity oc', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ZOTAC-GAMING-GeForce-RTX-3080-Trinity-OC-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-HDMI-3-x-DisplayPort.html' + }, + { + brand: 'zotac', + model: 'trinity', + series: '3080', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ZOTAC-GAMING-GeForce-RTX-3080-Trinity-Grafikkarten-GF-RTX-3080-10-GB-GDDR6X-PCIe-4.0-HDMI-3x-DisplayPort.html' + }, + { + brand: 'asus', + model: 'strix', + series: '3090', + url: + 'https://www.acom-pc.de/Peripherie-Zubehoer/noch-nicht-kategorisierte-Artikel/ASUS-ROG-Strix-GeForce-RTX-3090-ROG-STRIX-RTX3090-24G-GAMING-24GB-GDDR6X-2x-HDMI-3x-DP-90YV0F90-M0NM00-.html' + }, + { + brand: 'asus', + model: 'strix oc', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-ROG-STRIX-RTX3090-O24G-GAMING-OC-Edition-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-2-x-HDMI-3-x-DisplayPort.html' + }, + { + brand: 'asus', + model: 'tuf', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-TUF-Gaming-GeForce-RTX-3090-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'asus', + model: 'tuf oc', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ASUS-TUF-Gaming-GeForce-RTX-3090-OC-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'gigabyte', + model: 'aorus master', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-Aorus-GeForce-RTX-3090-Master-24G-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-HDMI-3x-DisplayPort.html' + }, + { + brand: 'gigabyte', + model: 'eagle oc', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-GeForce-RTX-3090-Eagle-OC-24G-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'gigabyte', + model: 'gaming oc', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/Gigabyte-GeForce-RTX-3090-Gaming-OC-24G-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-2x-HDMI-3x-DisplayPort.html' + }, + { + brand: 'msi', + model: 'gaming x trio', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/MSI-RTX-3090-GAMING-X-TRIO-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-HDMI-3x-DisplayPort.html' + }, + { + brand: 'msi', + model: 'ventus 3x oc', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/MSI-GeForce-RTX-3090-Ventus-3X-24G-OC-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-x16-HDMI-3x-DisplayPort.html' + }, + { + brand: 'zotac', + model: 'trinity', + series: '3090', + url: + 'https://www.acom-pc.de/Hardware-Software/Grafikkarten-Zubehoer/Grafikkarten-NVIDIA-PCI-Express/ZOTAC-GAMING-GeForce-RTX-3090-Trinity-Grafikkarten-GF-RTX-3090-24-GB-GDDR6X-PCIe-4.0-HDMI-3x-DisplayPort.html' + }, + { + brand: 'amd', + model: '5600x', + series: 'ryzen5600', + url: + 'https://www.acom-pc.de/Hardware-Software/CPU-Prozessor-/-CPU-Kuehler-Zubehoer/AMD-CPU/AMD-CPU-Socket-AM4/AMD-RYZEN-5-5600X-4.60GHZ-6-CORE-SKT-AM4-35MB-65W-PIB.html' + }, + { + brand: 'amd', + model: '5800x', + series: 'ryzen5800', + url: + 'https://www.acom-pc.de/Hardware-Software/CPU-Prozessor-/-CPU-Kuehler-Zubehoer/AMD-CPU/AMD-CPU-Socket-AM4/AMD-RYZEN-7-5800X-4.70GHZ-8-CORE-SKT-AM4-36MB-105W-WOF.html' + }, + { + brand: 'amd', + model: '5900x', + series: 'ryzen5900', + url: + 'https://www.acom-pc.de/Hardware-Software/CPU-Prozessor-/-CPU-Kuehler-Zubehoer/AMD-CPU/AMD-CPU-Socket-AM4/AMD-Ryzen-9-5900X-AMD-Ryzen-9-Socket-AM4-PC-7nm-AMD-3-7-GHz-AM4.html' + }, + { + brand: 'amd', + model: '5950x', + series: 'ryzen5950', + url: + 'https://www.acom-pc.de/Hardware-Software/CPU-Prozessor-/-CPU-Kuehler-Zubehoer/AMD-CPU/AMD-CPU-Socket-AM4/AMD-RYZEN-9-5950X-4.90GHZ-16-CORE-SKT-AM4-72MB-105W-WOF.html' + } + ], + name: 'acompc' +}; diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 1dc3f4262d..c12ddd6e42 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -1,4 +1,5 @@ import {config, defaultStoreData} from '../../config'; +import {AComPC} from './acompc'; import {Adorama} from './adorama'; import {Alternate} from './alternate'; import {AlternateNL} from './alternate-nl'; @@ -76,6 +77,7 @@ import {OfficeDepot} from './officedepot'; import {Otto} from './otto'; import {Overclockers} from './overclockers'; import {PCComponentes} from './pccomponentes'; +import {PCKing} from './pcking'; import {Pccg} from './pccg'; import {PlayStation} from './playstation'; import {Pny} from './pny'; @@ -105,6 +107,7 @@ import {Zotac} from './zotac'; import {logger} from '../../logger'; export const storeList = new Map([ + [AComPC.name, AComPC], [Adorama.name, Adorama], [Alternate.name, Alternate], [AlternateNL.name, AlternateNL], @@ -182,6 +185,7 @@ export const storeList = new Map([ [Otto.name, Otto], [Overclockers.name, Overclockers], [Pccg.name, Pccg], + [PCKing.name, PCKing], [PCComponentes.name, PCComponentes], [PlayStation.name, PlayStation], [Pny.name, Pny], diff --git a/src/store/model/pcking.ts b/src/store/model/pcking.ts new file mode 100644 index 0000000000..734bd49697 --- /dev/null +++ b/src/store/model/pcking.ts @@ -0,0 +1,213 @@ +import {Store} from './store'; + +export const PCKing: Store = { + currency: '€', + labels: { + inStock: { + container: '.es_order_box-article_detail', + text: ['sofort lieferbar [Versand]', 'abholbereit [PC-KING]'] + }, + maxPrice: { + container: 'div.es_product_price-article_detail > b', + euroFormat: true + }, + outOfStock: [ + { + container: '.es_order_box-article_detail', + text: ['nicht lieferbar'] + } + ] + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=12608766&s_supplier_aid=12608766' + }, + { + brand: 'asus', + model: 'strix', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794745' + }, + { + brand: 'asus', + model: 'strix oc', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=10&s_supplier_aid=14794746' + }, + { + brand: 'asus', + model: 'tuf', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794754' + }, + { + brand: 'asus', + model: 'tuf oc', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794753' + }, + { + brand: 'gigabyte', + model: 'aorus master', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14796022' + }, + { + brand: 'gigabyte', + model: 'eagle oc', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794747' + }, + { + brand: 'gigabyte', + model: 'gaming oc', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794750' + }, + { + brand: 'inno3d', + model: 'ichill x3', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14772705' + }, + { + brand: 'inno3d', + model: 'ichill x4', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14772706' + }, + { + brand: 'inno3d', + model: 'twin x2 oc', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794752' + }, + { + brand: 'msi', + model: 'gaming x trio', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794720' + }, + { + brand: 'zotac', + model: 'amp holo', + series: '3080', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14794721' + }, + { + brand: 'asus', + model: 'strix', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15140741' + }, + { + brand: 'asus', + model: 'strix oc', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15140740' + }, + { + brand: 'asus', + model: 'tuf', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15125015' + }, + { + brand: 'asus', + model: 'tuf oc', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15140739' + }, + { + brand: 'gigabyte', + model: 'aorus xtreme', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15152168' + }, + { + brand: 'gigabyte', + model: 'eagle oc', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15140898' + }, + { + brand: 'gigabyte', + model: 'gaming oc', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15140899' + }, + { + brand: 'gigabyte', + model: 'turbo', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15145820' + }, + { + brand: 'inno3d', + model: 'ichill x3', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14796780' + }, + { + brand: 'inno3d', + model: 'ichill x4', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15121636' + }, + { + brand: 'zotac', + model: 'trinity', + series: '3090', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=14753078' + }, + { + brand: 'amd', + model: '5600x', + series: 'ryzen5600', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15188115' + }, + { + brand: 'amd', + model: '5800x', + series: 'ryzen5800', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15188116' + }, + { + brand: 'amd', + model: '5950x', + series: 'ryzen5950', + url: + 'https://www.pcking.de/eshop.php?eslink=1&action=article_detail&s_supplier_id=14&s_supplier_aid=15188118' + } + ], + name: 'pcking' +};