Skip to content

Commit db07796

Browse files
authored
feat: add 50xx series (#3190)
1 parent 810cefc commit db07796

File tree

6 files changed

+113
-7
lines changed

6 files changed

+113
-7
lines changed

docs/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You do not need any computer skills, smarts, or anything of that nature. You are
1414
| tag | Example, `v1.0.0`; stable |
1515
| `main` | Latest HEAD; not tagged, could be unstable |
1616

17-
1. Download [Node.js 15](https://nodejs.org/en/)
17+
1. Download [Node.js 16](https://nodejs.org/en/)
1818
1. Clone this project `git clone https://github.com/jef/streetmerchant.git`.
1919
1. To checkout a particular reference, use `git checkout <ref name>` after cloning.
2020
1. Navigate to this project by entering `cd streetmerchant`.

src/config.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,12 @@ const store = {
420420
'4080-12g': envOrNumber(process.env.MAX_PRICE_SERIES_4080_12G),
421421
'4080-16g': envOrNumber(process.env.MAX_PRICE_SERIES_4080_16G),
422422
4090: envOrNumber(process.env.MAX_PRICE_SERIES_4090),
423+
5070: envOrNumber(process.env.MAX_PRICE_SERIES_5070),
424+
'5070ti': envOrNumber(process.env.MAX_PRICE_SERIES_5070TI),
425+
5080: envOrNumber(process.env.MAX_PRICE_SERIES_5080),
426+
5090: envOrNumber(process.env.MAX_PRICE_SERIES_5090),
427+
arc: envOrNumber(process.env.MAX_PRICE_SERIES_ARC),
428+
'a3-matx': envOrNumber(process.env.MAX_PRICE_SERIES_A3_MATX),
423429
'captcha-deterrent': 0,
424430
darkhero: envOrNumber(process.env.MAX_PRICE_SERIES_DARKHERO),
425431
'g4-doorbell-pro': envOrNumber(
@@ -433,6 +439,8 @@ const store = {
433439
ryzen5800: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5800),
434440
ryzen5900: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5900),
435441
ryzen5950: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5950),
442+
ryzen7950x: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN7950X),
443+
ryzen9800x3d: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN9800X3D),
436444
sf: envOrNumber(process.env.MAX_PRICE_SERIES_CORSAIR_SF),
437445
sonyps5c: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5C),
438446
sonyps5de: envOrNumber(process.env.MAX_PRICE_SERIES_SONYPS5DE),
@@ -463,6 +471,11 @@ const store = {
463471
'3080',
464472
'3080ti',
465473
'3090',
474+
'4090',
475+
'5070',
476+
'5070ti',
477+
'5080',
478+
'5090',
466479
'g4-doorbell-pro',
467480
'rx6700xt',
468481
'rx6800',
@@ -472,6 +485,8 @@ const store = {
472485
'ryzen5800',
473486
'ryzen5900',
474487
'ryzen5950',
488+
'ryzen7950',
489+
'ryzen9800x3d',
475490
'sf',
476491
'sonyps5c',
477492
'sonyps5de',
@@ -486,7 +501,7 @@ const store = {
486501
stores: envOrArray(process.env.STORES, ['amazon', 'bestbuy']).map(entry => {
487502
const [name, minPageSleep, maxPageSleep] = entry.match(/[^:]+/g) ?? [];
488503

489-
let proxyList = loadProxyList(name);
504+
let proxyList = loadProxyList(name as string);
490505

491506
if (!proxyList) {
492507
proxyList = loadProxyList('global');

src/store/model/amazon.ts

+24
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,30 @@ export const Amazon: Store = {
955955
series: '4080-16g',
956956
url: 'https://www.amazon.com/dp/B0BG95T5WD',
957957
},
958+
{
959+
brand: 'lianli',
960+
cartUrl:
961+
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0DFS88R2L&Quantity.1=1',
962+
model: 'a3 matx wd',
963+
series: 'a3-matx',
964+
url: 'https://www.amazon.com/dp/B0DFS88R2L',
965+
},
966+
{
967+
brand: 'sparkle',
968+
cartUrl:
969+
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0DNMH4KQM&Quantity.1=1',
970+
model: 'b580',
971+
series: 'arc',
972+
url: 'https://www.amazon.com/dp/B0DNMH4KQM',
973+
},
974+
{
975+
brand: 'intel',
976+
cartUrl:
977+
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0DPM9923G&Quantity.1=1',
978+
model: 'b580',
979+
series: 'arc',
980+
url: 'https://www.amazon.com/dp/B0DPM9923G',
981+
},
958982
],
959983
name: 'amazon',
960984
};

src/store/model/bestbuy.ts

+40-5
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ export const BestBuy: Store = {
99
},
1010
outOfStock: {
1111
container:
12-
'button.c-button.c-button-disabled[data-sku-id="54959778"][data-button-state="SOLD_OUT"]',
13-
text: ['Unavailable Nearby'],
12+
'button.c-button.c-button-disabled[data-button-state="SOLD_OUT]',
13+
text: ['coming soon'],
1414
},
1515
maxPrice: {
16-
container: '.pricing-price',
16+
container: '.priceView-price',
1717
},
1818
},
1919
links: [
@@ -23,6 +23,20 @@ export const BestBuy: Store = {
2323
series: 'test:series',
2424
url: 'https://api.bestbuy.com/click/-/6258941/pdp',
2525
},
26+
{
27+
brand: 'amd',
28+
model: '7950x',
29+
cartUrl: 'https://api.bestbuy.com/click/-/6519470/cart',
30+
series: 'ryzen7950x',
31+
url: 'https://api.bestbuy.com/click/-/6519470/pdp',
32+
},
33+
{
34+
brand: 'amd',
35+
model: '9800x3d',
36+
cartUrl: 'https://api.bestbuy.com/click/-/6606318/cart',
37+
series: 'ryzen9800x3d',
38+
url: 'https://api.bestbuy.com/click/-/6606318/pdp',
39+
},
2640
{
2741
brand: 'nvidia',
2842
cartUrl: 'https://api.bestbuy.com/click/-/6429442/cart',
@@ -669,10 +683,31 @@ export const BestBuy: Store = {
669683
},
670684
{
671685
brand: 'nvidia',
672-
cartUrl: 'https://api.bestbuy.com/click/-/6521431/cart',
686+
cartUrl: 'https://api.bestbuy.com/click/-/6614154/cart',
673687
model: 'founders edition',
674688
series: '4080-16g',
675-
url: 'https://api.bestbuy.com/click/-/6521431/pdp',
689+
url: 'https://api.bestbuy.com/click/-/6614154/pdp',
690+
},
691+
{
692+
brand: 'intel',
693+
cartUrl: 'https://api.bestbuy.com/click/-/6614154/cart',
694+
model: 'b580',
695+
series: 'arc',
696+
url: 'https://api.bestbuy.com/click/-/6614154/pdp',
697+
},
698+
{
699+
brand: 'nvidia',
700+
cartUrl: 'https://api.bestbuy.com/click/-/6614153/cart',
701+
model: 'founders edition',
702+
series: '5080',
703+
url: 'https://api.bestbuy.com/click/-/6614153/pdp',
704+
},
705+
{
706+
brand: 'nvidia',
707+
// cartUrl: 'https://api.bestbuy.com/click/-/6614151/cart',
708+
model: 'founders edition',
709+
series: '5090',
710+
url: 'https://api.bestbuy.com/click/-/6614151/pdp',
676711
},
677712
],
678713
name: 'bestbuy',

src/store/model/newegg.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,22 @@ export const Newegg: Store = {
15901590
series: '4080-16g',
15911591
url: 'https://www.newegg.com/asus-rog-crosshair-viii-dark-hero/p/N82E16814126601',
15921592
},
1593+
{
1594+
brand: 'sparkle',
1595+
cartUrl:
1596+
'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=N82E16814993013',
1597+
model: 'b580',
1598+
series: 'arc',
1599+
url: 'https://www.newegg.com/sparkle-intel-arc-b580-titan-oc-12gb-gddr6/p/N82E16814993013',
1600+
},
1601+
{
1602+
brand: 'lianli',
1603+
cartUrl:
1604+
'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=2AM-000Z-000E0',
1605+
model: 'a3 matx wd',
1606+
series: 'a3-matx',
1607+
url: 'https://www.newegg.com/p/2AM-000Z-000E0',
1608+
},
15931609
],
15941610
name: 'newegg',
15951611
realTimeInventoryLookup: async (itemNumber: string) => {

src/store/model/store.ts

+16
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export type Brand =
2323
| 'galax'
2424
| 'gigabyte'
2525
| 'inno3d'
26+
| 'intel'
2627
| 'kfa2'
28+
| 'lianli'
2729
| 'leadtek'
2830
| 'microsoft'
2931
| 'msi'
@@ -34,12 +36,15 @@ export type Brand =
3436
| 'powercolor'
3537
| 'sapphire'
3638
| 'sony'
39+
| 'sparkle'
3740
| 'ubiquiti'
3841
| 'xfx'
3942
| 'zotac';
4043

4144
export type Series =
4245
| 'test:series'
46+
| 'a3-matx'
47+
| 'arc'
4348
| 'captcha-deterrent'
4449
| '3050'
4550
| '3060'
@@ -52,6 +57,10 @@ export type Series =
5257
| '4080-12g'
5358
| '4080-16g'
5459
| '4090'
60+
| '5070'
61+
| '5070ti'
62+
| '5080'
63+
| '5090'
5564
| 'darkhero'
5665
| 'g4-doorbell-pro'
5766
| 'rx6800'
@@ -62,6 +71,8 @@ export type Series =
6271
| 'ryzen5800'
6372
| 'ryzen5900'
6473
| 'ryzen5950'
74+
| 'ryzen7950x'
75+
| 'ryzen9800x3d'
6576
| 'sonyps5c'
6677
| 'sonyps5de'
6778
| 'sf'
@@ -80,9 +91,12 @@ export type Model =
8091
| '5800x'
8192
| '5900x'
8293
| '5950x'
94+
| '7950x'
95+
| '9800x3d'
8396
| '600 platinum'
8497
| '600 gold'
8598
| '750 platinum'
99+
| 'a3 matx wd'
86100
| 'amd reference'
87101
| 'amp extreme airo'
88102
| 'amp extreme holo'
@@ -104,6 +118,7 @@ export type Model =
104118
| 'aorus box'
105119
| 'articstorm'
106120
| 'battle-ax'
121+
| 'b580'
107122
| 'challenger'
108123
| 'challenger oc'
109124
| 'challenger pro'
@@ -203,6 +218,7 @@ export type Model =
203218
| 'qick ultra'
204219
| 'red devil'
205220
| 'red dragon'
221+
| 'sf1000'
206222
| 'sg oc'
207223
| 'sg'
208224
| 'single fan'

0 commit comments

Comments
 (0)