From 07b2da4fe983debc1375f927410893e258ab7f01 Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Sun, 20 Sep 2020 16:45:56 -0400 Subject: [PATCH] chore(store): filter amazon third party vendors (#126) --- README.md | 2 +- src/store/lookup.ts | 4 ++-- src/store/model/adorama.ts | 22 +++++++++++----------- src/store/model/amazon-ca.ts | 28 ++++++++++++++-------------- src/store/model/amazon.ts | 32 ++++++++++++++++---------------- src/store/model/asus.ts | 6 +++--- src/store/model/bandh.ts | 20 ++++++++++---------- src/store/model/bestbuy.ts | 32 ++++++++++++++++---------------- src/store/model/evga.ts | 12 ++++++------ src/store/model/microcenter.ts | 16 ++++++++-------- src/store/model/newegg.ts | 32 ++++++++++++++++---------------- src/store/model/nvidia.ts | 14 +++++++------- src/store/model/store.ts | 10 +++++----- 13 files changed, 115 insertions(+), 115 deletions(-) diff --git a/README.md b/README.md index 9e9de93..2664235 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Here is a list of variables that you can use to customize your newly copied `.en | `SCREENSHOT` | Capture screenshot of page if a card is found | Default: `true` | | `TELEGRAM_ACCESS_TOKEN` | Telegram access token | | `TELEGRAM_CHAT_ID` | Telegram chat ID | -| `USER_AGENT` | Custom User-Agent header for HTTP requests; optional | +| `USER_AGENT` | Custom User-Agent header for HTTP requests | Default: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36` | > :point_right: If you have multi-factor authentication (MFA), you will need to create an [app password](https://myaccount.google.com/apppasswords) and use this instead of your Gmail password. diff --git a/src/store/lookup.ts b/src/store/lookup.ts index cd6f211..bde670b 100644 --- a/src/store/lookup.ts +++ b/src/store/lookup.ts @@ -71,9 +71,9 @@ async function lookup(browser: Browser, store: Store) { Logger.debug(textContent); - if (includesLabels(textContent, store.labels.oosList)) { + if (includesLabels(textContent, store.labels.outOfStock)) { Logger.info(`✖ [${store.name}] still out of stock: ${graphicsCard}`); - } else if (store.labels.captchaList && includesLabels(textContent, store.labels.captchaList)) { + } else if (store.labels.captcha && includesLabels(textContent, store.labels.captcha)) { Logger.warn(`✖ [${store.name}] CAPTCHA from: ${graphicsCard}. Waiting for a bit with this store...`); await delay(getSleepTime()); } else if (response && response.status() === 429) { diff --git a/src/store/model/adorama.ts b/src/store/model/adorama.ts index e05ec87..323c654 100644 --- a/src/store/model/adorama.ts +++ b/src/store/model/adorama.ts @@ -3,63 +3,63 @@ import {Store} from './store'; export const Adorama: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.adorama.com/ev08gp43067k.html' }, { - series: '3080', brand: 'pny', model: 'xlr8', + series: '3080', url: 'https://www.adorama.com/pnv301tfxmpb.html' }, { - series: '3080', brand: 'msi', model: 'gaming x trio', + series: '3080', url: 'https://www.adorama.com/msig380gxt1.html' }, { - series: '3080', brand: 'evga', model: 'ftw3 ultra', + series: '3080', url: 'https://www.adorama.com/ev10g53897kr.html' }, { - series: '3080', brand: 'evga', model: 'xc3 ultra', + series: '3080', url: 'https://www.adorama.com/ev10g53885kr.html' }, { - series: '3080', brand: 'evga', model: 'ftw3', + series: '3080', url: 'https://www.adorama.com/ev10g53895kr.html' }, { - series: '3080', brand: 'evga', model: 'xc3', + series: '3080', url: 'https://www.adorama.com/ev10g53883kr.html' }, { - series: '3080', brand: 'evga', model: 'xc3 black', + series: '3080', url: 'https://www.adorama.com/ev10g53881kr.html' }, { - series: '3080', brand: 'msi', model: 'ventus 3x oc', + series: '3080', url: 'https://www.adorama.com/msig38v3x10c.html' } ], labels: { - oosList: ['temporarily not available', 'out of stock'], - captchaList: ['please verify you are a human'] + captcha: ['please verify you are a human'], + outOfStock: ['temporarily not available', 'out of stock'] }, name: 'adorama' }; diff --git a/src/store/model/amazon-ca.ts b/src/store/model/amazon-ca.ts index 7f3e9a5..3fbf4bc 100644 --- a/src/store/model/amazon-ca.ts +++ b/src/store/model/amazon-ca.ts @@ -3,81 +3,81 @@ import {Store} from './store'; export const AmazonCa: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.amazon.ca/GeForce-RTX-2060-Architecture-Graphics/dp/B07PBLD2MX/ref=sr_1_2' }, { - series: '3080', brand: 'msi', model: 'gaming x trio', + series: '3080', url: 'https://www.amazon.ca/MSI-GeForce-RTX-3080-10G/dp/B08HR7SV3M?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'ftw3', + series: '3080', url: 'https://www.amazon.ca/EVGA-GeForce-Technology-Backplate-10G-P5-3895-KR/dp/B08HR3DPGW?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'ftw3 ultra', + series: '3080', url: 'https://www.amazon.ca/EVGA-GeForce-Technology-Backplate-10G-P5-3897-KR/dp/B08HR3Y5GQ?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'xc3 ultra', + series: '3080', url: 'https://www.amazon.ca/EVGA-GeForce-Cooling-Backplate-10G-P5-3885-KR/dp/B08HR55YB5?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'xc3', + series: '3080', url: 'https://www.amazon.ca/EVGA-GeForce-Cooling-Backplate-10G-P5-3883-KR/dp/B08HR4RJ3Q?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'xc3 black', + series: '3080', url: 'https://www.amazon.ca/EVGA-GeForce-Gaming-Cooling-10G-P5-3881-KR/dp/B08HR6FMF3?ref_=ast_sto_dp' }, { - series: '3080', brand: 'gigabyte', model: 'gaming oc', + series: '3080', url: 'https://www.amazon.ca/GIGABYTE-GeForce-Graphics-WINDFORCE-GV-N3080GAMING/dp/B08HJTH61J?ref_=ast_sto_dp' }, { - series: '3080', brand: 'gigabyte', model: 'eagle oc', + series: '3080', url: 'https://www.amazon.ca/GIGABYTE-GeForce-Graphics-WINDFORCE-GV-N3080EAGLE/dp/B08HJS2JLJ?ref_=ast_sto_dp' }, { - series: '3080', brand: 'asus', model: 'tuf', + series: '3080', url: 'https://www.amazon.ca/Asus-90YV0FB0-M0AM00-TUF-RTX3080-10G-GAMING/dp/B08HHDP9DW?ref_=ast_sto_dp' }, { - series: '3080', brand: 'asus', model: 'tuf oc', + series: '3080', url: 'https://www.amazon.ca/Asus-90YV0FB1-M0AM00-TUF-RTX3080-O10G-GAMING/dp/B08HH5WF97?ref_=ast_sto_dp' }, { - series: '3080', brand: 'msi', model: 'ventus 3x oc', + series: '3080', url: 'https://www.amazon.ca/MSI-GeForce-RTX-3080-10G/dp/B08HR5SXPS?ref_=ast_sto_dp' } ], labels: { - oosList: ['currently unavailable'], - captchaList: ['enter the characters you see below'] + captcha: ['enter the characters you see below'], + outOfStock: ['currently unavailable'] }, name: 'amazon-ca' }; diff --git a/src/store/model/amazon.ts b/src/store/model/amazon.ts index 7d7210d..805efb6 100644 --- a/src/store/model/amazon.ts +++ b/src/store/model/amazon.ts @@ -3,93 +3,93 @@ import {Store} from './store'; export const Amazon: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.amazon.com/MSI-GeForce-RTX-2060-Architecture/dp/B07MQ36Z6L/ref=sr_1_4' }, { - series: '3080', brand: 'pny', model: 'xlr8', + series: '3080', url: 'https://www.amazon.com/PNY-GeForce-Gaming-Epic-X-Graphics/dp/B08HBR7QBM?ref_=ast_sto_dp' }, { - series: '3080', brand: 'msi', model: 'gaming x trio', + series: '3080', url: 'https://www.amazon.com/MSI-GeForce-RTX-3080-10G/dp/B08HR7SV3M?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'ftw3 ultra', + series: '3080', url: 'https://www.amazon.com/EVGA-10G-P5-3897-KR-GeForce-Technology-Backplate/dp/B08HR3Y5GQ?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'xc3 ultra', + series: '3080', url: 'https://www.amazon.com/EVGA-10G-P5-3885-KR-GeForce-Cooling-Backplate/dp/B08HR55YB5?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'ftw3', + series: '3080', url: 'https://www.amazon.com/EVGA-10G-P5-3895-KR-GeForce-Technology-Backplate/dp/B08HR3DPGW?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'xc3', + series: '3080', url: 'https://www.amazon.com/EVGA-10G-P5-3883-KR-GeForce-Cooling-Backplate/dp/B08HR4RJ3Q?ref_=ast_sto_dp' }, { - series: '3080', brand: 'evga', model: 'xc3 black', + series: '3080', url: 'https://www.amazon.com/EVGA-10G-P5-3881-KR-GeForce-GAMING-Cooling/dp/B08HR6FMF3?ref_=ast_sto_dp' }, { - series: '3080', brand: 'gigabyte', model: 'gaming oc', + series: '3080', url: 'https://www.amazon.com/GIGABYTE-GeForce-Graphics-WINDFORCE-GV-N3080GAMING/dp/B08HJTH61J?ref_=ast_sto_dp' }, { - series: '3080', brand: 'gigabyte', model: 'eagle oc', + series: '3080', url: 'https://www.amazon.com/GIGABYTE-GeForce-Graphics-WINDFORCE-GV-N3080EAGLE/dp/B08HJS2JLJ?ref_=ast_sto_dp' }, { - series: '3080', brand: 'asus', model: 'tuf oc', + series: '3080', url: 'https://www.amazon.com/ASUS-Graphics-DisplayPort-Military-Grade-Certification/dp/B08HH5WF97?ref_=ast_sto_dp' }, { - series: '3080', brand: 'asus', model: 'tuf', + series: '3080', url: 'https://www.amazon.com/ASUS-Graphics-DisplayPort-Military-Grade-Certification/dp/B08HHDP9DW?ref_=ast_sto_dp' }, { - series: '3080', brand: 'msi', model: 'ventus 3x oc', + series: '3080', url: 'https://www.amazon.com/MSI-GeForce-RTX-3080-10G/dp/B08HR5SXPS?ref_=ast_sto_dp' }, { - series: '3080', brand: 'zotac', model: 'trinity', + series: '3080', url: 'https://www.amazon.com/ZOTAC-Graphics-IceStorm-Advanced-ZT-A30800D-10P/dp/B08HJNKT3P?ref_=ast_sto_dp' } ], labels: { - oosList: ['currently unavailable'], - captchaList: ['enter the characters you see below'] + captcha: ['enter the characters you see below'], + outOfStock: ['currently unavailable', 'available from these sellers'] }, name: 'amazon' }; diff --git a/src/store/model/asus.ts b/src/store/model/asus.ts index cb125cb..e7be3f5 100644 --- a/src/store/model/asus.ts +++ b/src/store/model/asus.ts @@ -3,20 +3,20 @@ import {Store} from './store'; export const Asus: Store = { links: [ { - series: '3080', brand: 'asus', model: 'tuf oc', + series: '3080', url: 'https://store.asus.com/us/item/202009AM160000001/' }, { - series: '3080', brand: 'asus', model: 'tuf', + series: '3080', url: 'https://store.asus.com/us/item/202009AM150000004/' } ], labels: { - oosList: ['coming soon', 'temporarily sold out'] + outOfStock: ['coming soon', 'temporarily sold out'] }, name: 'asus' }; diff --git a/src/store/model/bandh.ts b/src/store/model/bandh.ts index 28e447d..8d05127 100644 --- a/src/store/model/bandh.ts +++ b/src/store/model/bandh.ts @@ -3,63 +3,63 @@ import {Store} from './store'; export const BAndH: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.bhphotovideo.com/c/product/1452927-REG/evga_06g_p4_2063_kr_geforce_rtx_2060_xc.html' }, { - series: '3080', brand: 'asus', model: 'tuf', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593649-REG/asus_tuf_rtx3080_10g_gaming_tuf_gaming_geforce_rtx.html' }, { - series: '3080', brand: 'gigabyte', model: 'gaming oc', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593333-REG/gigabyte_gv_n3080gaming_oc_10gd_geforce_rtx_3080_gaming.html' }, { - series: '3080', brand: 'zotac', model: 'trinity', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1592969-REG/zotac_zt_a30800d_10p_gaming_geforce_rtx_3080.html' }, { - series: '3080', brand: 'asus', model: 'tuf oc', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593650-REG/asus_tuf_rtx3080_o10g_gaming_tuf_gaming_geforce_rtx.html' }, { - series: '3080', brand: 'msi', model: 'gaming x trio', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593996-REG/msi_g3080gxt10_geforce_rtx_3080_gaming.html' }, { - series: '3080', brand: 'msi', model: 'ventus 3x oc', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593997-REG/msi_g3080v3x10c_geforce_rtx_3080_ventus.html' }, { - series: '3080', brand: 'msi', model: 'gaming x trio - duplicate', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593645-REG/msi_geforce_rtx_3080_gaming.html' }, { - series: '3080', brand: 'msi', model: 'ventus 3x oc - duplicate', + series: '3080', url: 'https://www.bhphotovideo.com/c/product/1593646-REG/msi_geforce_rtx_3080_ventus.html' } ], labels: { - oosList: ['notify when available'] + outOfStock: ['notify when available'] }, name: 'bandh' }; diff --git a/src/store/model/bestbuy.ts b/src/store/model/bestbuy.ts index 6721512..0326894 100644 --- a/src/store/model/bestbuy.ts +++ b/src/store/model/bestbuy.ts @@ -3,63 +3,63 @@ import {Store} from './store'; export const BestBuy: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.bestbuy.com/site/nvidia-geforce-rtx-2060-super-8gb-gddr6-pci-express-graphics-card-black-silver/6361329.p?skuId=6361329' }, { - series: '3080', brand: 'nvidia', + cartUrl: 'https://api.bestbuy.com/click/-/6429440/cart', model: 'founders edition', url: 'https://www.bestbuy.com/site/nvidia-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card-titanium-and-black/6429440.p?skuId=6429440', - cartUrl: 'https://api.bestbuy.com/click/-/6429440/cart' + series: '3080' }, { - series: '3080', brand: 'asus', + cartUrl: 'https://api.bestbuy.com/click/-/6432445/cart', model: 'rog strix', url: 'https://www.bestbuy.com/site/asus-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-strix-graphics-card-black/6432445.p?skuId=6432445', - cartUrl: 'https://api.bestbuy.com/click/-/6432445/cart' + series: '3080' }, { - series: '3080', brand: 'evga', + cartUrl: 'https://api.bestbuy.com/click/-/6432399/cart', model: 'xc3 black', url: 'https://www.bestbuy.com/site/evga-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card/6432399.p?skuId=6432399', - cartUrl: 'https://api.bestbuy.com/click/-/6432399/cart' + series: '3080' }, { - series: '3080', brand: 'evga', + cartUrl: 'https://api.bestbuy.com/click/-/6432400/cart', model: 'xc3 ultra', url: 'https://www.bestbuy.com/site/evga-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card/6432400.p?skuId=6432400', - cartUrl: 'https://api.bestbuy.com/click/-/6432400/cart' + series: '3080' }, { - series: '3080', brand: 'gigabyte', + cartUrl: 'https://api.bestbuy.com/click/-/6430620/cart', model: 'gaming oc', url: 'https://www.bestbuy.com/site/gigabyte-geforce-rtx-3080-10g-gddr6x-pci-express-4-0-graphics-card-black/6430620.p?acampID=0&cmp=RMX&loc=Hatch&ref=198&skuId=6430620', - cartUrl: 'https://api.bestbuy.com/click/-/6430620/cart' + series: '3080' }, { - series: '3080', brand: 'gigabyte', + cartUrl: 'https://api.bestbuy.com/click/-/6430621/cart', model: 'eagle oc', url: 'https://www.bestbuy.com/site/gigabyte-geforce-rtx-3080-10g-gddr6x-pci-express-4-0-graphics-card-black/6430621.p?skuId=6430621', - cartUrl: 'https://api.bestbuy.com/click/-/6430621/cart' + series: '3080' }, { - series: '3080', brand: 'msi', + cartUrl: 'https://api.bestbuy.com/click/-/6430175/cart', model: 'ventus 3x oc', url: 'https://www.bestbuy.com/site/msi-geforce-rtx-3080-ventus-3x-10g-oc-bv-gddr6x-pci-express-4-0-graphic-card-black-silver/6430175.p?skuId=6430175', - cartUrl: 'https://api.bestbuy.com/click/-/6430175/cart' + series: '3080' } ], labels: { - oosList: ['sold out', 'coming soon'] + outOfStock: ['sold out', 'coming soon'] }, name: 'bestbuy' }; diff --git a/src/store/model/evga.ts b/src/store/model/evga.ts index 8262c2f..292318c 100644 --- a/src/store/model/evga.ts +++ b/src/store/model/evga.ts @@ -3,38 +3,38 @@ import {Store} from './store'; export const Evga: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.evga.com/products/product.aspx?pn=06G-P4-2065-KR' }, { - series: '3080', brand: 'evga', model: 'xc3 black', + series: '3080', url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3881-KR' }, { - series: '3080', brand: 'evga', model: 'ftw3', + series: '3080', url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3897-KR' }, { - series: '3080', brand: 'evga', model: 'xc3', + series: '3080', url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3883-KR' }, { - series: '3080', brand: 'evga', model: 'xc3 ultra', + series: '3080', url: 'https://www.evga.com/products/product.aspx?pn=10G-P5-3885-KR' } ], labels: { - oosList: ['out of stock'] + outOfStock: ['out of stock'] }, name: 'evga' }; diff --git a/src/store/model/microcenter.ts b/src/store/model/microcenter.ts index 2a84b99..7dae366 100644 --- a/src/store/model/microcenter.ts +++ b/src/store/model/microcenter.ts @@ -3,50 +3,50 @@ import {Store} from './store'; export const MicroCenter: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.microcenter.com/product/618433/evga-geforce-rtx-2060-ko-ultra-overclocked-dual-fan-6gb-gddr6-pcie-30-graphics-card' }, { - series: '3080', brand: 'evga', model: 'xc3 ultra', + series: '3080', url: 'https://www.microcenter.com/product/628344/evga-geforce-rtx-3080-xc3-ultra-gaming-triple-fan-10gb-gddr6x-pcie-40-graphics-card' }, { - series: '3080', brand: 'msi', model: 'ventus 3x', + series: '3080', url: 'https://www.microcenter.com/product/628331/msi-geforce-rtx-3080-ventus-3x-overclocked-triple-fan-10gb-gddr6x-pcie-40-graphics-card' }, { - series: '3080', brand: 'asus', model: 'tuf', + series: '3080', url: 'https://www.microcenter.com/product/628303/asus-geforce-rtx-3080-tuf-gaming-triple-fan-10gb-gddr6x-pcie-40-graphics-card' }, { - series: '3080', brand: 'msi', model: 'gaming x trio', + series: '3080', url: 'https://www.microcenter.com/product/628330/msi-geforce-rtx-3080-gaming-x-trio-triple-fan-10gb-gddr6x-pcie-40-graphics-card' }, { - series: '3080', brand: 'evga', model: 'xc3 black', + series: '3080', url: 'https://www.microcenter.com/product/628340/evga-geforce-rtx-3080-xc3-black-triple-fan-10gb-gddr6x-pcie-40-graphics-card' }, { - series: '3080', brand: 'zotac', model: 'trinity', + series: '3080', url: 'https://www.microcenter.com/product/628607/zotac-geforce-rtx-3080-trinity-overclocked-triple-fan-10gb-gddr6x-pcie-40-graphics-card' } ], labels: { - oosList: ['sold out'] + outOfStock: ['sold out'] }, name: 'microcenter' }; diff --git a/src/store/model/newegg.ts b/src/store/model/newegg.ts index d208fe4..c368050 100644 --- a/src/store/model/newegg.ts +++ b/src/store/model/newegg.ts @@ -3,94 +3,94 @@ import {Store} from './store'; export const NewEgg: Store = { links: [ { - series: 'debug', brand: 'TEST', model: 'CARD', + series: 'debug', url: 'https://www.newegg.com/evga-geforce-rtx-2060-06g-p4-2066-kr/p/N82E16814487488', cartUrl: 'https://api.bestbuy.com/click/-/6432445/cart' }, { - series: '3080', brand: 'asus', model: 'tuf', + series: '3080', url: 'https://www.newegg.com/asus-geforce-rtx-3080-tuf-rtx3080-10g-gaming/p/N82E16814126453' }, { - series: '3080', brand: 'evga', model: 'xc3 black', + series: '3080', url: 'https://www.newegg.com/evga-geforce-rtx-3080-10g-p5-3881-kr/p/N82E16814487522' }, { - series: '3080', brand: 'evga', model: 'xc3', + series: '3080', url: 'https://www.newegg.com/evga-geforce-rtx-3080-10g-p5-3883-kr/p/N82E16814487521' }, { - series: '3080', brand: 'evga', model: 'xc3 ultra', + series: '3080', url: 'https://www.newegg.com/evga-geforce-rtx-3080-10g-p5-3885-kr/p/N82E16814487520' }, { - series: '3080', brand: 'msi', model: 'ventus 3x', + series: '3080', url: 'https://www.newegg.com/msi-geforce-rtx-3080-rtx-3080-ventus-3x-10g/p/N82E16814137600' }, { - series: '3080', brand: 'msi', model: 'ventus 3x oc', + series: '3080', url: 'https://www.newegg.com/msi-geforce-rtx-3080-rtx-3080-ventus-3x-10g-oc/p/N82E16814137598' }, { - series: '3080', brand: 'msi', model: 'gaming x trio', + series: '3080', url: 'https://www.newegg.com/msi-geforce-rtx-3080-rtx-3080-gaming-x-trio-10g/p/N82E16814137597' }, { - series: '3080', brand: 'gigabyte', model: 'gaming oc', + series: '3080', url: 'https://www.newegg.com/gigabyte-geforce-rtx-3080-gv-n3080gaming-oc-10gd/p/N82E16814932329' }, { - series: '3080', brand: 'gigabyte', model: 'eagle oc', + series: '3080', url: 'https://www.newegg.com/gigabyte-geforce-rtx-3080-gv-n3080eagle-oc-10gd/p/N82E16814932330' }, { - series: '3080', brand: 'zotac', model: 'trinity', + series: '3080', url: 'https://www.newegg.com/zotac-geforce-rtx-3080-zt-a30800d-10p/p/N82E16814500502' }, { - series: '3080', brand: 'asus', model: 'rog strix', + series: '3080', url: 'https://www.newegg.com/asus-geforce-rtx-3080-rog-strix-rtx3080-o10g-gaming/p/N82E16814126457' }, { - series: '3080', brand: 'asus', model: 'tuf oc', + series: '3080', url: 'https://www.newegg.com/asus-geforce-rtx-3080-tuf-rtx3080-o10g-gaming/p/N82E16814126452' }, { - series: '3080', brand: 'zotac', model: 'trinity oc', + series: '3080', url: 'https://www.newegg.com/zotac-geforce-rtx-3080-zt-t30800j-10p/p/N82E16814500504' } ], labels: { - oosList: ['auto notify', 'see similar items below'], - captchaList: ['are you a human?'] + captcha: ['are you a human?'], + outOfStock: ['auto notify', 'see similar items below'] }, name: 'newegg' }; diff --git a/src/store/model/nvidia.ts b/src/store/model/nvidia.ts index edd1358..b9abf99 100644 --- a/src/store/model/nvidia.ts +++ b/src/store/model/nvidia.ts @@ -3,22 +3,22 @@ import {Store} from './store'; export const Nvidia: Store = { links: [ { - series: 'debug', brand: 'TEST', + cartUrl: 'https://www.nvidia.com/en-us/shop/geforce', model: 'CARD', - url: 'https://api.digitalriver.com/v1/shoppers/me/products/5379432500/inventory-status?apiKey=9485fa7b159e42edb08a83bde0d83dia', - cartUrl: 'https://www.nvidia.com/en-us/shop/geforce' + series: 'debug', + url: 'https://api.digitalriver.com/v1/shoppers/me/products/5379432500/inventory-status?apiKey=9485fa7b159e42edb08a83bde0d83dia' }, { - series: '3080', brand: 'nvidia', + cartUrl: 'https://www.nvidia.com/en-us/shop/geforce', model: 'founders edition', - url: 'https://api.digitalriver.com/v1/shoppers/me/products/5438481700/inventory-status?apiKey=9485fa7b159e42edb08a83bde0d83dia', - cartUrl: 'https://www.nvidia.com/en-us/shop/geforce' + series: '3080', + url: 'https://api.digitalriver.com/v1/shoppers/me/products/5438481700/inventory-status?apiKey=9485fa7b159e42edb08a83bde0d83dia' } ], labels: { - oosList: ['product_inventory_out_of_stock', 'rate limit exceeded'] + outOfStock: ['product_inventory_out_of_stock', 'rate limit exceeded'] }, name: 'nvidia' }; diff --git a/src/store/model/store.ts b/src/store/model/store.ts index a169fff..06d42cf 100644 --- a/src/store/model/store.ts +++ b/src/store/model/store.ts @@ -1,14 +1,14 @@ export interface Link { - series: string; brand: string; - model: string; - url: string; cartUrl?: string; + model: string; + series: string; + url: string; } export interface Labels { - oosList: string[]; - captchaList?: string[]; + outOfStock: string[]; + captcha?: string[]; } export interface Store {