diff --git a/.env-example b/.env-example index 07fde0a178..4379eb64be 100644 --- a/.env-example +++ b/.env-example @@ -17,7 +17,7 @@ HEADLESS="" IN_STOCK_WAIT_TIME="" LOG_LEVEL="" LOW_BANDWIDTH="" -MAX_PRICE_SERIES_3060="" +MAX_PRICE_SERIES_3060TI="" MAX_PRICE_SERIES_3070="" MAX_PRICE_SERIES_3080="" MAX_PRICE_SERIES_3090="" @@ -31,6 +31,7 @@ MAX_PRICE_SERIES_RYZEN5900="" MAX_PRICE_SERIES_RYZEN5950="" MAX_PRICE_SERIES_SONYPS5C="" MAX_PRICE_SERIES_SONYPS5DE="" +MAX_PRICE_SERIES_TEST="" MICROCENTER_LOCATION="" MQTT_BROKER_ADDRESS="" MQTT_BROKER_PORT="" diff --git a/README.md b/README.md index d9203572d5..98ba79fce6 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,7 @@ environment variables are **optional**._ | `MAX_PRICE_SERIES_RYZEN5950` | Maximum price allowed for a match, applies AMD 5950 series cpus | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - CPUs above `1234` will be skipped. | | `MAX_PRICE_SERIES_SONYPS5C` | Maximum price allowed for a match, applies PS5 console | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - PS5 above `1234` will be skipped. | | `MAX_PRICE_SERIES_SONYPS5DE` | Maximum price allowed for a match, applies PS5 digital edition | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - PS5 above `1234` will be skipped. | +| `MAX_PRICE_SERIES_TEST` | Maximum price allowed for a match, applies `test:series` | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - PS5 above `1234` will be skipped. | | `MICROCENTER_LOCATION` | Specific MicroCenter location(s) to search | Comma separated, e.g.: `marietta,duluth`, default: `web` | | `NVIDIA_ADD_TO_CART_ATTEMPTS` | The maximum number of times the `nvidia-api` add to cart feature will be attempted before failing | Default: `10` | | `NVIDIA_SESSION_TTL` | The time in milliseconds to keep the cart active while using `nvidia-api` | Default: `60000` | @@ -156,6 +157,7 @@ environment variables are **optional**._ | AMD (DE) | `amd-de`| | AMD (IT) | `amd-it`| | AntOnline | `antonline`| +| Argos (UK) | `argos`| | Aria PC (UK) | `aria`| | ARLT (DE) | `arlt`| | ASUS | `asus` | diff --git a/src/config.ts b/src/config.ts index b23bb22688..826c0f2ab9 100644 --- a/src/config.ts +++ b/src/config.ts @@ -322,7 +322,7 @@ const store = { sf: envOrNumber(process.env.MAX_PRICE_SERIES_CORSAIR_SF), sonyps5c: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5C), sonyps5de: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5DE), - 'test:series': -1, + 'test:series': envOrNumber(process.env.MAX_PRICE_SERIES_TEST), xboxss: -1, xboxsx: -1 } diff --git a/src/store/model/argos.ts b/src/store/model/argos.ts new file mode 100644 index 0000000000..e340dbbda4 --- /dev/null +++ b/src/store/model/argos.ts @@ -0,0 +1,34 @@ +import {Store} from './store'; + +export const Argos: Store = { + labels: { + inStock: { + container: 'button[data-test="add-to-trolley-button-button"', + text: ['to trolley'] + }, + maxPrice: { + container: 'li[itemprop="price"]' + } + }, + links: [ + { + brand: 'test:brand', + model: 'test:model', + series: 'test:series', + url: 'https://www.argos.co.uk/product/5718469' + }, + { + brand: 'asus', + model: 'ps5 console', + series: 'sonyps5c', + url: 'https://www.argos.co.uk/product/6795199' + }, + { + brand: 'sony', + model: 'ps5 digital', + series: 'sonyps5de', + url: 'https://www.argos.co.uk/product/6795151' + } + ], + name: 'argos' +}; diff --git a/src/store/model/index.ts b/src/store/model/index.ts index 2a70b8d5fd..979a3030d7 100644 --- a/src/store/model/index.ts +++ b/src/store/model/index.ts @@ -15,6 +15,7 @@ import {AmdCa} from './amd-ca'; import {AmdDe} from './amd-de'; import {AmdIt} from './amd-it'; import {AntOnline} from './antonline'; +import {Argos} from './argos'; import {Aria} from './aria'; import {Arlt} from './arlt'; import {Asus} from './asus'; @@ -93,6 +94,7 @@ export const storeList = new Map([ [AmdDe.name, AmdDe], [AmdIt.name, AmdIt], [AntOnline.name, AntOnline], + [Argos.name, Argos], [Aria.name, Aria], [Arlt.name, Arlt], [Asus.name, Asus], diff --git a/src/store/model/store.ts b/src/store/model/store.ts index c1300bcb11..7376dcaeee 100644 --- a/src/store/model/store.ts +++ b/src/store/model/store.ts @@ -1,4 +1,4 @@ -import {Browser, BrowserContext, LoadEvent} from 'puppeteer'; +import {Browser, LoadEvent} from 'puppeteer'; export type Element = { container?: string;