feat(discord): dynamic currency symbol (#1328)

This commit is contained in:
sohaiiil
2020-12-12 14:01:54 +00:00
committed by GitHub
parent ad0b2fe525
commit cccfde245a
91 changed files with 99 additions and 5 deletions
+1
View File
@@ -11,6 +11,7 @@ const link: Link = {
}; };
const store: Store = { const store: Store = {
currency: '',
labels: { labels: {
inStock: { inStock: {
container: 'test:container', container: 'test:container',
+6 -1
View File
@@ -37,7 +37,12 @@ export function sendDiscordMessage(link: Link, store: Store) {
.setTimestamp(); .setTimestamp();
embed.addField('Store', store.name, true); embed.addField('Store', store.name, true);
if (link.price) embed.addField('Price', `$${link.price}`, true); if (link.price)
embed.addField(
'Price',
`${store.currency}${link.price}`,
true
);
embed.addField('Product Page', link.url); embed.addField('Product Page', link.url);
if (link.cartUrl) embed.addField('Add to Cart', link.cartUrl); if (link.cartUrl) embed.addField('Add to Cart', link.cartUrl);
embed.addField('Brand', link.brand, true); embed.addField('Brand', link.brand, true);
+2 -2
View File
@@ -18,12 +18,12 @@ import {sendTwitchMessage} from './twitch';
export function sendNotification(link: Link, store: Store) { export function sendNotification(link: Link, store: Store) {
// Priority // Priority
playSound(); playSound();
sendDiscordMessage(link, store);
sendDesktopNotification(link, store);
sendEmail(link, store); sendEmail(link, store);
sendSms(link, store); sendSms(link, store);
sendDesktopNotification(link, store);
// Non-priority // Non-priority
adjustPhilipsHueLights(); adjustPhilipsHueLights();
sendDiscordMessage(link, store);
sendMqttMessage(link, store); sendMqttMessage(link, store);
sendPagerDutyNotification(link, store); sendPagerDutyNotification(link, store);
sendPushbulletNotification(link, store); sendPushbulletNotification(link, store);
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Adorama: Store = { export const Adorama: Store = {
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AlternateNL: Store = { export const AlternateNL: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.stockStatus', container: '.stockStatus',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Alternate: Store = { export const Alternate: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.stockStatus', container: '.stockStatus',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AmazonCa: Store = { export const AmazonCa: Store = {
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const AmazonDeWarehouse: Store = { export const AmazonDeWarehouse: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const AmazonDe: Store = { export const AmazonDe: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const AmazonEs: Store = { export const AmazonEs: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const AmazonFr: Store = { export const AmazonFr: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const AmazonIt: Store = { export const AmazonIt: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AmazonNl: Store = { export const AmazonNl: Store = {
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -4,6 +4,7 @@ import {parseCard} from './helpers/card';
export const AmazonUk: Store = { export const AmazonUk: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '£',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Amazon: Store = { export const Amazon: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AmdCa: Store = { export const AmdCa: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.btn-shopping-cart', container: '.btn-shopping-cart',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AmdDe: Store = { export const AmdDe: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.btn-shopping-cart', container: '.btn-shopping-cart',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AmdIt: Store = { export const AmdIt: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.btn-shopping-cart', container: '.btn-shopping-cart',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Amd: Store = { export const Amd: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.btn-shopping-cart', container: '.btn-shopping-cart',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AntOnline: Store = { export const AntOnline: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.uk-button', container: '.uk-button',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Argos: Store = { export const Argos: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: 'button[data-test="add-to-trolley-button-button"', container: 'button[data-test="add-to-trolley-button-button"',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Aria: Store = { export const Aria: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '#addQuantity', container: '#addQuantity',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Arlt: Store = { export const Arlt: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.articleDesc .shippingtext', container: '.articleDesc .shippingtext',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const AsusDe: Store = { export const AsusDe: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.buybox--button', container: '.buybox--button',
+1
View File
@@ -3,6 +3,7 @@ import fetch from 'node-fetch';
export const Asus: Store = { export const Asus: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '#item_add_cart', container: '#item_add_cart',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Awd: Store = { export const Awd: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '.vs-stock .ty-qty-in-stock', container: '.vs-stock .ty-qty-in-stock',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Azerty: Store = { export const Azerty: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.orderdelay', container: '.orderdelay',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const BAndH: Store = { export const BAndH: Store = {
backoffStatusCodes: [403, 429], backoffStatusCodes: [403, 429],
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: 'div[data-selenium="addToCartSection"]', container: 'div[data-selenium="addToCartSection"]',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const BestBuyCa: Store = { export const BestBuyCa: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.addToCartContainer_2uzan', container: '.addToCartContainer_2uzan',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const BestBuy: Store = { export const BestBuy: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: container:
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Box: Store = { export const Box: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '#divBuyButton', container: '#divBuyButton',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const CanadaComputers: Store = { export const CanadaComputers: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: 'div[class="pi-prod-availability"]', container: 'div[class="pi-prod-availability"]',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Caseking: Store = { export const Caseking: Store = {
backoffStatusCodes: [403, 429], backoffStatusCodes: [403, 429],
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.delivery_container', container: '.delivery_container',
+1
View File
@@ -3,6 +3,7 @@ import {getProductLinksBuilder} from './helpers/card';
export const Ccl: Store = { export const Ccl: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '#pnlAddToBasket', container: '#pnlAddToBasket',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Comet: Store = { export const Comet: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.caption', container: '.caption',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Computeruniverse: Store = { export const Computeruniverse: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.availability', container: '.availability',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Coolblue: Store = { export const Coolblue: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.product-order', container: '.product-order',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Coolmod: Store = { export const Coolmod: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.product-availability', container: '.product-availability',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Corsair: Store = { export const Corsair: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.add_to_cart_form', container: '.add_to_cart_form',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Currys: Store = { export const Currys: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '#product-actions button', container: '#product-actions button',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Cyberport: Store = { export const Cyberport: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.tooltipAvailabilityParent', container: '.tooltipAvailabilityParent',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const EbGames: Store = { export const EbGames: Store = {
currency: '$',
labels: { labels: {
maxPrice: { maxPrice: {
container: '.singleVariantText .prodPriceCont' container: '.singleVariantText .prodPriceCont'
+2 -1
View File
@@ -2,10 +2,11 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Ebuyer: Store = { export const Ebuyer: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '.purchase-info', container: '.purchase-info',
text: ['add to basket', 'in stock'] text: ['add to basket', 'in stock', 'pre-order']
}, },
maxPrice: { maxPrice: {
container: '.purchase-info__price .price', container: '.purchase-info__price .price',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Elcorteingles: Store = { export const Elcorteingles: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
// Captcha: { // Captcha: {
// container: 'body', // container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Eprice: Store = { export const Eprice: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.topSideDx', container: '.topSideDx',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const EuronicsDE: Store = { export const EuronicsDE: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.buy-btn--cart-text', container: '.buy-btn--cart-text',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Euronics: Store = { export const Euronics: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.purchaseButtonsWidth', container: '.purchaseButtonsWidth',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const EvgaEu: Store = { export const EvgaEu: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.product-buy-specs', container: '.product-buy-specs',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Evga: Store = { export const Evga: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.product-buy-specs', container: '.product-buy-specs',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Expert: Store = { export const Expert: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Galaxus: Store = { export const Galaxus: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '#addToCartButton:enabled', container: '#addToCartButton:enabled',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Game: Store = { export const Game: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '.buyingOptions', container: '.buyingOptions',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const GamestopDE: Store = { export const GamestopDE: Store = {
currency: '€',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Gamestop: Store = { export const Gamestop: Store = {
currency: '$',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Kabum: Store = { export const Kabum: Store = {
currency: 'R$',
labels: { labels: {
inStock: { inStock: {
container: '.botao-comprar', container: '.botao-comprar',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Mediamarkt: Store = { export const Mediamarkt: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'p', container: 'p',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Medimax: Store = { export const Medimax: Store = {
currency: '€',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Megekko: Store = { export const Megekko: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.product-order .text_green', container: '.product-order .text_green',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const MemoryExpress: Store = { export const MemoryExpress: Store = {
currency: '$',
labels: { labels: {
maxPrice: { maxPrice: {
container: container:
+1
View File
@@ -209,6 +209,7 @@ for (const microCenterLocation of microCenterLocations) {
} }
export const MicroCenter: Store = { export const MicroCenter: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '#cart-options', container: '#cart-options',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Mindfactory: Store = { export const Mindfactory: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.pshipping', container: '.pshipping',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import fetch from 'node-fetch'; import fetch from 'node-fetch';
export const NeweggCa: Store = { export const NeweggCa: Store = {
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import fetch from 'node-fetch'; import fetch from 'node-fetch';
export const Newegg: Store = { export const Newegg: Store = {
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Notebooksbilliger: Store = { export const Notebooksbilliger: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '.warehouse', container: '.warehouse',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Novatech: Store = { export const Novatech: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '.newspec-specprice', container: '.newspec-specprice',
+1
View File
@@ -237,6 +237,7 @@ export const regionInfos = new Map<string, NvidiaRegionInfo>([
]); ]);
export const NvidiaApi: Store = { export const NvidiaApi: Store = {
currency: '',
labels: { labels: {
inStock: { inStock: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Nvidia: Store = { export const Nvidia: Store = {
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const OfficeDepot: Store = { export const OfficeDepot: Store = {
currency: '$',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Otto: Store = { export const Otto: Store = {
currency: '€',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Overclockers: Store = { export const Overclockers: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '#detailbox', container: '#detailbox',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const PCComponentes: Store = { export const PCComponentes: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '#btnsWishAddBuy', container: '#btnsWishAddBuy',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import fetch from 'node-fetch'; import fetch from 'node-fetch';
export const PlayStation: Store = { export const PlayStation: Store = {
currency: '$',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Pny: Store = { export const Pny: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '#ctl01_lbtnAddToCart', container: '#ctl01_lbtnAddToCart',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const ProshopDE: Store = { export const ProshopDE: Store = {
currency: '€',
labels: { labels: {
maxPrice: { maxPrice: {
container: container:
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const ProshopDK: Store = { export const ProshopDK: Store = {
currency: 'kr.',
labels: { labels: {
inStock: { inStock: {
container: '.site-stock', container: '.site-stock',
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Saturn: Store = { export const Saturn: Store = {
backoffStatusCodes: [403, 429, 503], backoffStatusCodes: [403, 429, 503],
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'p', container: 'p',
+2 -1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
import {getProductLinksBuilder} from './helpers/card'; import {getProductLinksBuilder} from './helpers/card';
export const Scan: Store = { export const Scan: Store = {
currency: '£',
disableAdBlocker: true, disableAdBlocker: true,
labels: { labels: {
captcha: [ captcha: [
@@ -29,7 +30,7 @@ export const Scan: Store = {
model: 'test:model', model: 'test:model',
series: 'test:series', series: 'test:series',
url: url:
'https://www.scan.co.uk/products/msi-geforce-rtx-2060-ventus-xs-oc-6gb-gddr6-vr-ready-graphics-card-1920-core-1710mhz-boost' 'https://www.scan.co.uk/products/nvidia-shield-tv-media-streamer-tegra-x1plus-processor-8gb-storage-2gb-ram-4k-hdr-ready-ai-upscaling'
}, },
{ {
brand: 'sony', brand: 'sony',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const SmythsToys: Store = { export const SmythsToys: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '#addToCartButton', container: '#addToCartButton',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Spielegrotte: Store = { export const Spielegrotte: Store = {
currency: '€',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -180,6 +180,7 @@ export type Store = {
}; };
labels: Labels; labels: Labels;
name: string; name: string;
currency: '£' | '$' | '€' | 'R$' | 'kr.' | '';
setupAction?: (browser: Browser) => void; setupAction?: (browser: Browser) => void;
/** /**
* The range of status codes which considered successful, i.e. without error * The range of status codes which considered successful, i.e. without error
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Target: Store = { export const Target: Store = {
currency: '$',
labels: { labels: {
inStock: [ inStock: [
{ {
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const TopAchat: Store = { export const TopAchat: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: 'input.cart.button[value="Ajouter au panier"]', container: 'input.cart.button[value="Ajouter au panier"]',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const ToysRUs: Store = { export const ToysRUs: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: 'li.b-product_status', container: 'li.b-product_status',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Unieuro: Store = { export const Unieuro: Store = {
currency: '€',
labels: { labels: {
captcha: { captcha: {
container: 'body', container: 'body',
+1
View File
@@ -3,6 +3,7 @@ import {logger} from '../../logger';
import {parseCard} from './helpers/card'; import {parseCard} from './helpers/card';
export const Very: Store = { export const Very: Store = {
currency: '£',
labels: { labels: {
inStock: { inStock: {
container: '.stockMessaging .indicator', container: '.stockMessaging .indicator',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const VsGamers: Store = { export const VsGamers: Store = {
currency: '€',
labels: { labels: {
inStock: { inStock: {
container: '#vs-product-sheet-dashboard', container: '#vs-product-sheet-dashboard',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const WalmartCa: Store = { export const WalmartCa: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '[data-automation="cta-button"]', container: '[data-automation="cta-button"]',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Walmart: Store = { export const Walmart: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: container:
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Wipoid: Store = { export const Wipoid: Store = {
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '#add_to_cart', container: '#add_to_cart',
+1
View File
@@ -1,6 +1,7 @@
import {Store} from './store'; import {Store} from './store';
export const Xbox: Store = { export const Xbox: Store = {
currency: '$',
labels: { labels: {
outOfStock: { outOfStock: {
container: container:
+1
View File
@@ -2,6 +2,7 @@ import {Store} from './store';
export const Zotac: Store = { export const Zotac: Store = {
backoffStatusCodes: [403, 503], backoffStatusCodes: [403, 503],
currency: '$',
labels: { labels: {
inStock: { inStock: {
container: '.add-to-cart-wrapper', container: '.add-to-cart-wrapper',