mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 06:27:38 +00:00
feat(store): add argos with ps5
Updated env-example Add max price for test series Signed-off-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
+2
-1
@@ -17,7 +17,7 @@ HEADLESS=""
|
|||||||
IN_STOCK_WAIT_TIME=""
|
IN_STOCK_WAIT_TIME=""
|
||||||
LOG_LEVEL=""
|
LOG_LEVEL=""
|
||||||
LOW_BANDWIDTH=""
|
LOW_BANDWIDTH=""
|
||||||
MAX_PRICE_SERIES_3060=""
|
MAX_PRICE_SERIES_3060TI=""
|
||||||
MAX_PRICE_SERIES_3070=""
|
MAX_PRICE_SERIES_3070=""
|
||||||
MAX_PRICE_SERIES_3080=""
|
MAX_PRICE_SERIES_3080=""
|
||||||
MAX_PRICE_SERIES_3090=""
|
MAX_PRICE_SERIES_3090=""
|
||||||
@@ -31,6 +31,7 @@ MAX_PRICE_SERIES_RYZEN5900=""
|
|||||||
MAX_PRICE_SERIES_RYZEN5950=""
|
MAX_PRICE_SERIES_RYZEN5950=""
|
||||||
MAX_PRICE_SERIES_SONYPS5C=""
|
MAX_PRICE_SERIES_SONYPS5C=""
|
||||||
MAX_PRICE_SERIES_SONYPS5DE=""
|
MAX_PRICE_SERIES_SONYPS5DE=""
|
||||||
|
MAX_PRICE_SERIES_TEST=""
|
||||||
MICROCENTER_LOCATION=""
|
MICROCENTER_LOCATION=""
|
||||||
MQTT_BROKER_ADDRESS=""
|
MQTT_BROKER_ADDRESS=""
|
||||||
MQTT_BROKER_PORT=""
|
MQTT_BROKER_PORT=""
|
||||||
|
|||||||
@@ -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_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_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_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` |
|
| `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_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` |
|
| `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 (DE) | `amd-de`|
|
||||||
| AMD (IT) | `amd-it`|
|
| AMD (IT) | `amd-it`|
|
||||||
| AntOnline | `antonline`|
|
| AntOnline | `antonline`|
|
||||||
|
| Argos (UK) | `argos`|
|
||||||
| Aria PC (UK) | `aria`|
|
| Aria PC (UK) | `aria`|
|
||||||
| ARLT (DE) | `arlt`|
|
| ARLT (DE) | `arlt`|
|
||||||
| ASUS | `asus` |
|
| ASUS | `asus` |
|
||||||
|
|||||||
+1
-1
@@ -322,7 +322,7 @@ const store = {
|
|||||||
sf: envOrNumber(process.env.MAX_PRICE_SERIES_CORSAIR_SF),
|
sf: envOrNumber(process.env.MAX_PRICE_SERIES_CORSAIR_SF),
|
||||||
sonyps5c: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5C),
|
sonyps5c: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5C),
|
||||||
sonyps5de: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5DE),
|
sonyps5de: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5DE),
|
||||||
'test:series': -1,
|
'test:series': envOrNumber(process.env.MAX_PRICE_SERIES_TEST),
|
||||||
xboxss: -1,
|
xboxss: -1,
|
||||||
xboxsx: -1
|
xboxsx: -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'
|
||||||
|
};
|
||||||
@@ -15,6 +15,7 @@ import {AmdCa} from './amd-ca';
|
|||||||
import {AmdDe} from './amd-de';
|
import {AmdDe} from './amd-de';
|
||||||
import {AmdIt} from './amd-it';
|
import {AmdIt} from './amd-it';
|
||||||
import {AntOnline} from './antonline';
|
import {AntOnline} from './antonline';
|
||||||
|
import {Argos} from './argos';
|
||||||
import {Aria} from './aria';
|
import {Aria} from './aria';
|
||||||
import {Arlt} from './arlt';
|
import {Arlt} from './arlt';
|
||||||
import {Asus} from './asus';
|
import {Asus} from './asus';
|
||||||
@@ -93,6 +94,7 @@ export const storeList = new Map([
|
|||||||
[AmdDe.name, AmdDe],
|
[AmdDe.name, AmdDe],
|
||||||
[AmdIt.name, AmdIt],
|
[AmdIt.name, AmdIt],
|
||||||
[AntOnline.name, AntOnline],
|
[AntOnline.name, AntOnline],
|
||||||
|
[Argos.name, Argos],
|
||||||
[Aria.name, Aria],
|
[Aria.name, Aria],
|
||||||
[Arlt.name, Arlt],
|
[Arlt.name, Arlt],
|
||||||
[Asus.name, Asus],
|
[Asus.name, Asus],
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {Browser, BrowserContext, LoadEvent} from 'puppeteer';
|
import {Browser, LoadEvent} from 'puppeteer';
|
||||||
|
|
||||||
export type Element = {
|
export type Element = {
|
||||||
container?: string;
|
container?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user