Skip to content

Commit

Permalink
feat: add 50xx series (#3190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ycube authored Jan 10, 2025
1 parent 810cefc commit db07796
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You do not need any computer skills, smarts, or anything of that nature. You are
| tag | Example, `v1.0.0`; stable |
| `main` | Latest HEAD; not tagged, could be unstable |

1. Download [Node.js 15](https://nodejs.org/en/)
1. Download [Node.js 16](https://nodejs.org/en/)
1. Clone this project `git clone https://github.com/jef/streetmerchant.git`.
1. To checkout a particular reference, use `git checkout <ref name>` after cloning.
1. Navigate to this project by entering `cd streetmerchant`.
Expand Down
17 changes: 16 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ const store = {
'4080-12g': envOrNumber(process.env.MAX_PRICE_SERIES_4080_12G),
'4080-16g': envOrNumber(process.env.MAX_PRICE_SERIES_4080_16G),
4090: envOrNumber(process.env.MAX_PRICE_SERIES_4090),
5070: envOrNumber(process.env.MAX_PRICE_SERIES_5070),
'5070ti': envOrNumber(process.env.MAX_PRICE_SERIES_5070TI),
5080: envOrNumber(process.env.MAX_PRICE_SERIES_5080),
5090: envOrNumber(process.env.MAX_PRICE_SERIES_5090),
arc: envOrNumber(process.env.MAX_PRICE_SERIES_ARC),
'a3-matx': envOrNumber(process.env.MAX_PRICE_SERIES_A3_MATX),
'captcha-deterrent': 0,
darkhero: envOrNumber(process.env.MAX_PRICE_SERIES_DARKHERO),
'g4-doorbell-pro': envOrNumber(
Expand All @@ -433,6 +439,8 @@ const store = {
ryzen5800: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5800),
ryzen5900: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5900),
ryzen5950: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN5950),
ryzen7950x: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN7950X),
ryzen9800x3d: envOrNumber(process.env.MAX_PRICE_SERIES_RYZEN9800X3D),
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),
Expand Down Expand Up @@ -463,6 +471,11 @@ const store = {
'3080',
'3080ti',
'3090',
'4090',
'5070',
'5070ti',
'5080',
'5090',
'g4-doorbell-pro',
'rx6700xt',
'rx6800',
Expand All @@ -472,6 +485,8 @@ const store = {
'ryzen5800',
'ryzen5900',
'ryzen5950',
'ryzen7950',
'ryzen9800x3d',
'sf',
'sonyps5c',
'sonyps5de',
Expand All @@ -486,7 +501,7 @@ const store = {
stores: envOrArray(process.env.STORES, ['amazon', 'bestbuy']).map(entry => {
const [name, minPageSleep, maxPageSleep] = entry.match(/[^:]+/g) ?? [];

let proxyList = loadProxyList(name);
let proxyList = loadProxyList(name as string);

if (!proxyList) {
proxyList = loadProxyList('global');
Expand Down
24 changes: 24 additions & 0 deletions src/store/model/amazon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,30 @@ export const Amazon: Store = {
series: '4080-16g',
url: 'https://www.amazon.com/dp/B0BG95T5WD',
},
{
brand: 'lianli',
cartUrl:
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0DFS88R2L&Quantity.1=1',
model: 'a3 matx wd',
series: 'a3-matx',
url: 'https://www.amazon.com/dp/B0DFS88R2L',
},
{
brand: 'sparkle',
cartUrl:
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0DNMH4KQM&Quantity.1=1',
model: 'b580',
series: 'arc',
url: 'https://www.amazon.com/dp/B0DNMH4KQM',
},
{
brand: 'intel',
cartUrl:
'https://www.amazon.com/gp/aws/cart/add.html?ASIN.1=B0DPM9923G&Quantity.1=1',
model: 'b580',
series: 'arc',
url: 'https://www.amazon.com/dp/B0DPM9923G',
},
],
name: 'amazon',
};
45 changes: 40 additions & 5 deletions src/store/model/bestbuy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export const BestBuy: Store = {
},
outOfStock: {
container:
'button.c-button.c-button-disabled[data-sku-id="54959778"][data-button-state="SOLD_OUT"]',
text: ['Unavailable Nearby'],
'button.c-button.c-button-disabled[data-button-state="SOLD_OUT]',
text: ['coming soon'],
},
maxPrice: {
container: '.pricing-price',
container: '.priceView-price',
},
},
links: [
Expand All @@ -23,6 +23,20 @@ export const BestBuy: Store = {
series: 'test:series',
url: 'https://api.bestbuy.com/click/-/6258941/pdp',
},
{
brand: 'amd',
model: '7950x',
cartUrl: 'https://api.bestbuy.com/click/-/6519470/cart',
series: 'ryzen7950x',
url: 'https://api.bestbuy.com/click/-/6519470/pdp',
},
{
brand: 'amd',
model: '9800x3d',
cartUrl: 'https://api.bestbuy.com/click/-/6606318/cart',
series: 'ryzen9800x3d',
url: 'https://api.bestbuy.com/click/-/6606318/pdp',
},
{
brand: 'nvidia',
cartUrl: 'https://api.bestbuy.com/click/-/6429442/cart',
Expand Down Expand Up @@ -669,10 +683,31 @@ export const BestBuy: Store = {
},
{
brand: 'nvidia',
cartUrl: 'https://api.bestbuy.com/click/-/6521431/cart',
cartUrl: 'https://api.bestbuy.com/click/-/6614154/cart',
model: 'founders edition',
series: '4080-16g',
url: 'https://api.bestbuy.com/click/-/6521431/pdp',
url: 'https://api.bestbuy.com/click/-/6614154/pdp',
},
{
brand: 'intel',
cartUrl: 'https://api.bestbuy.com/click/-/6614154/cart',
model: 'b580',
series: 'arc',
url: 'https://api.bestbuy.com/click/-/6614154/pdp',
},
{
brand: 'nvidia',
cartUrl: 'https://api.bestbuy.com/click/-/6614153/cart',
model: 'founders edition',
series: '5080',
url: 'https://api.bestbuy.com/click/-/6614153/pdp',
},
{
brand: 'nvidia',
// cartUrl: 'https://api.bestbuy.com/click/-/6614151/cart',
model: 'founders edition',
series: '5090',
url: 'https://api.bestbuy.com/click/-/6614151/pdp',
},
],
name: 'bestbuy',
Expand Down
16 changes: 16 additions & 0 deletions src/store/model/newegg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,22 @@ export const Newegg: Store = {
series: '4080-16g',
url: 'https://www.newegg.com/asus-rog-crosshair-viii-dark-hero/p/N82E16814126601',
},
{
brand: 'sparkle',
cartUrl:
'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=N82E16814993013',
model: 'b580',
series: 'arc',
url: 'https://www.newegg.com/sparkle-intel-arc-b580-titan-oc-12gb-gddr6/p/N82E16814993013',
},
{
brand: 'lianli',
cartUrl:
'https://secure.newegg.com/Shopping/AddtoCart.aspx?Submit=ADD&ItemList=2AM-000Z-000E0',
model: 'a3 matx wd',
series: 'a3-matx',
url: 'https://www.newegg.com/p/2AM-000Z-000E0',
},
],
name: 'newegg',
realTimeInventoryLookup: async (itemNumber: string) => {
Expand Down
16 changes: 16 additions & 0 deletions src/store/model/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export type Brand =
| 'galax'
| 'gigabyte'
| 'inno3d'
| 'intel'
| 'kfa2'
| 'lianli'
| 'leadtek'
| 'microsoft'
| 'msi'
Expand All @@ -34,12 +36,15 @@ export type Brand =
| 'powercolor'
| 'sapphire'
| 'sony'
| 'sparkle'
| 'ubiquiti'
| 'xfx'
| 'zotac';

export type Series =
| 'test:series'
| 'a3-matx'
| 'arc'
| 'captcha-deterrent'
| '3050'
| '3060'
Expand All @@ -52,6 +57,10 @@ export type Series =
| '4080-12g'
| '4080-16g'
| '4090'
| '5070'
| '5070ti'
| '5080'
| '5090'
| 'darkhero'
| 'g4-doorbell-pro'
| 'rx6800'
Expand All @@ -62,6 +71,8 @@ export type Series =
| 'ryzen5800'
| 'ryzen5900'
| 'ryzen5950'
| 'ryzen7950x'
| 'ryzen9800x3d'
| 'sonyps5c'
| 'sonyps5de'
| 'sf'
Expand All @@ -80,9 +91,12 @@ export type Model =
| '5800x'
| '5900x'
| '5950x'
| '7950x'
| '9800x3d'
| '600 platinum'
| '600 gold'
| '750 platinum'
| 'a3 matx wd'
| 'amd reference'
| 'amp extreme airo'
| 'amp extreme holo'
Expand All @@ -104,6 +118,7 @@ export type Model =
| 'aorus box'
| 'articstorm'
| 'battle-ax'
| 'b580'
| 'challenger'
| 'challenger oc'
| 'challenger pro'
Expand Down Expand Up @@ -203,6 +218,7 @@ export type Model =
| 'qick ultra'
| 'red devil'
| 'red dragon'
| 'sf1000'
| 'sg oc'
| 'sg'
| 'single fan'
Expand Down

0 comments on commit db07796

Please sign in to comment.