Coder Social home page Coder Social logo

jef / streetmerchant Goto Github PK

View Code? Open in Web Editor NEW
5.0K 105.0 1.3K 10.85 MB

๐Ÿค– The world's easiest, most powerful stock checker

Home Page: https://jef.buzz/streetmerchant

License: MIT License

TypeScript 99.09% Dockerfile 0.08% HTML 0.40% Makefile 0.02% JavaScript 0.01% HCL 0.40%
bot shopping hacktoberfest

streetmerchant's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streetmerchant's Issues

Using api.nvidia.com to check for stock and auto add to cart (3090 FE approach)

I'm working in Ruby, but here's the basic approach...

Check api.nvidia.com at a random interval:

https://api.nvidia.partners/edge/product/search?page=1&limit=9&locale=en-us&category=GPU&gpu=RTX%203090&manufacturer=NVIDIA&manufacturer_filter=NVIDIA~1,ASUS~1,EVGA~3,GIGABYTE~2,MSI~1,PNY~0,ZOTAC~0

I believe product is in stock when digitialRiverID has a value.

When that happens, open this link to automatically add to cart:

https://store.nvidia.com/store/nvidia/en_US/buy/productID.${digitialRiverID}/clearCart.yes/nextPage.QuickBuyCartPage

I expect one of you to sell me a card at price if you get multiple before me ๐Ÿ˜‚

NOTE: I've include a link for 3090 on api.nvidia.com, read carefully and you should be able to modify this for future launches in combination with the filters on nvidia.com.

Suggestion only use chromium/chrome for opening browser window

Description

When using nvidia-snatcher from SSH, when headless is enabled and open browser is disabled it seems to still want to use chromium/chrome to do the checks.

Possible solution

Use curl or another way of checking the URLs, or perhaps create a list of all of the libraries needed to get chromium to run in SSH

Error playing sound

Can't get sound alerts to work, have tried .wav and .m4a files, both in .resources/sounds/ and .resources/sounds/true/

filenames are alert.wav and alert2.m4a

This is while testing notifications with NOTIFICATION_TEST set to true

Saw no more config information in any readme so asking here

for french people

does the nvidia.com stock be the same in europe than in US if it's different how can i fix this

Discord Invite Expired

Description

Discord Invite in README.md broken ;)

Possible solution

Create new invite

Add timestamps to logs

Could the program have an option to list the time the line was created on each line. I keep having the software stop working and just sitting there and a time would definitely help make sure its still doing its thing at a glance.

Newegg false positives (missing 'out of stock')

Description

The Newegg store is giving false positives due to the removal of the 'out of stock' string for out of stock detection.

Possible solution

Add 'out of stock' to the oosList label in the NewEgg store.

scripts throws some error, then freezes after timeout.

Description

Hi, it is now 8:52pm the script is frozen and stuck since 8:45pm after timing out.

I noticed some errors before that on "INFO: could not find files for giver pattern(s)" also "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'links' of undefined"

image

Possible solution

error playing sound: Error: Couldn't find a suitable audio player

I get this error every time the script tries to play the notification sound
"error playing sound: Error: Couldn't find a suitable audio player"
I can open and play the file perfectly fine when i click on it. Anyone have an idea of what I could do to fix this?

Program fails at 1-2 hours due to lack of memory

Description

The program runs well for 1-2 hours, and then fails. The failure message mentions memory allocation, but I should have more than enough ram. Here is the error message:

<--- Last few GCs --->
t of marking 77 ms) (average mu = 0.226, current mu = 0.114) alloca[28112:000001B8ACB04470] 3894656 ms: Mark-sweep 2045.5 (2061.8) -> 2044.4 (2060.7) MB, 78.5 / 0.0 ms (+ 0.0 ms in 1 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 78 ms) (average mu = 0.134, current mu = 0.019) finali[28112:000001B8ACB04470] 3894740 ms: Mark-sweep 2045.4 (2061.7) -> 2045.4 (2062.7) MB, 79.8 / 0.0 ms (average mu = 0.093, current mu = 0.050) allocation failure scavenge might not succeed

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 00007FF796CB106C]

Security context: 0x0195739c08d1
1: toString [00000365647B1AA1] [buffer.js:~774] [pc=00000044DD4D53F0](this=0x0331f5fc0b69 ,0x0322e97c04b1 ,0x0322e97c04b1 ,0x0322e97c04b1 )
2: arguments adaptor frame: 0->3
3: _write [00000072550F2241] [D:\downloads\3080 buyer\node_modules\ws\lib\receiver.js:~73] [pc=00000044DD...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF796115F0F napi_wrap+114095
2: 00007FF7960C0B96 v8::base::CPU::has_sse+66998
3: 00007FF7960C1996 v8::base::CPU::has_sse+70582
4: 00007FF7968D6E9E v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF7968BEF71 v8::SharedArrayBuffer::Externalize+833
6: 00007FF79678B1DC v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
7: 00007FF796796410 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
8: 00007FF796792F34 v8::internal::Heap::PageFlagsAreConsistent+3204
9: 00007FF796788733 v8::internal::Heap::CollectGarbage+1283
10: 00007FF796786DA4 v8::internal::Heap::AddRetainedMap+2452
11: 00007FF7967AEA2B v8::internal::Factory::NewRawOneByteString+91
12: 00007FF7967B1732 v8::internal::Factory::NewStringFromUtf8+130
13: 00007FF7968D376A v8::String::NewFromUtf8+298
14: 00007FF795FE7821 node::tracing::TraceEventHelper::SetAgent+40561
15: 00007FF7960D956D v8::internal::Malloced::operator delete+2829
16: 00007FF796CB106C v8::internal::SetupIsolateDelegate::SetupHeap+45852
17: 00000044DD4D53F0
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] start: npm run build && node build/index.js
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Speed up site checking

Description

Right now sites are being checked in sequence, which can result in a long gap between checks of the same site, especially if there are slow checks in the process.
For example, when I'm checking Nvidia, Bestbuy, and Newegg only, there is a ~2min gap between checks of the FE on Nvidia's store. Considering how fast the first round sold out and how low the FE stock is, this is definitely too slow.
This can probably be solved if some or all the checks can be made to run in parallel.

Filter card brand and model

Description

It would be nice to filter by brand and model across all sites.

Possible solution

Create global keys for brands and models and make a filter function.

catch on page timeout error to auto restart app

Description

On page timeouts, the application crashes with an unhandled exception for the promise that doesn't get resolved because the page times out. Need to catch this so the app doesn't crash.

Possible solution

I'm not the brains, you are :D

JavaScript Heap out of memory

Description

First of all, thank you for this awesome tool!

After about 1.5hrs of runtime, javascript ran out of memory.
image

Possible solution

Apologies if I'm being the big dumb, I don't have much experience with javascript or node js.

Locales for `oosLabels`

Description

For those who are using different languages outside of English, we need a way to support multiple languages and domains.

Possible solution

Create locale injector for each language type and have people help translate.

Use DigitalRiver directly to check for stock on Nvidia

I'm working in Ruby, but here's the basic approach...

Check digital river at a random interval:

https://api.digitalriver.com/v1/shoppers/me/products/5438481700/inventory-status?apiKey=9485fa7b159e42edb08a83bde0d83dia

Cards should be in stock when status is not PRODUCT_INVENTORY_OUT_OF_STOCK.

When that happens, open this link to automatically add to cart:

https://store.nvidia.com/store/nvidia/en_US/buy/productID.5438481700/clearCart.yes/nextPage.QuickBuyCartPage

I expect one of you to sell me a card at price if you get multiple before me ๐Ÿ˜‚

NOTE: 5438481700 is the 3080 US digital river id. I'll post a separate issue with a way of using api.nvidia.com for finding digital river id and opening add to cart when avaliable. You'll want to use this other approach for 3090 launch.

Prompting for Chromium.app to accept incoming network connections.

I don't know if it's a step I'm missing in the setup, but on my mac the chromium being used by puppeteer is throwing firewall prompts all the time.

"Do you want the application 'Chromium.app' to accept incoming network connections".

This keeps prompting even if Allow is selected. Is there a step missing to whitelist the right chromium app in the fireball?

Thanks.

False positives for bhphotovideo and newegg

Containerized nvidia-snatcher

For anyone that doesn't have node.js on their system or wants to drop this on AWS, here's a Dockerfile I threw together. Feel free to make improvements on this!

Usage notes:

  • The chromium version (~83) being used is not a happy camper and certain stores will randomly crash 20% of the time.
  • You need to make changes to the puppeteer launcher + package.json

Dockerfile

FROM node:14-alpine3.12

# Chrome setup
RUN apk update && apk add --no-cache nmap && \
  echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
  echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
  apk update && \
  apk add --no-cache \
  "chromium>81" \
  harfbuzz \
  ca-certificates \
  freetype \
  freetype-dev \
  ttf-freefont \
  nss

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV CHROMIUM_PATH=/usr/bin/chromium-browser

# Create working directory for node app
RUN mkdir -p /usr/src/app

# CD into working directory and copy package.json into it
WORKDIR /usr/src/app
COPY package.json package.json

# Install and clean cache
RUN npm install

# Copy all files into working directory
COPY . .

# Start node app when container started
CMD [ "npm", "start" ]

index.ts > main()

async function main() {
	const results = [];
	const browser = await puppeteer.launch({
		headless: true,
		executablePath: process.env.CHROMIUM_PATH,
		args: ['--no-sandbox', '--disable-dev-shm-usage'],
	});

	for (const store of Stores) {
		Logger.debug(store.links);
		results.push(lookup(browser, store));
	}

	await Promise.all(results);
	await browser.close();

	Logger.info('โ†— trying stores again');
	setTimeout(main, Config.rateLimitTimeout);
}

package.json

"puppeteer": "^3.1.0"

Add EU sites

is-it the same stock for french peolpe than the us or do i need to modify something?

Suggestion: Split out CAPTCHA labels out of `oosLabels`

Description

Basically split off "out of stock" and "CAPTCHA" labels so that we can log those differently (and see if we just hit a CAPTCHA 100% of the time vs only occassionally)
Would be fairly easy to implement (and I'd gladly PR it myself if it is desired)

Possible solution

Well, the solution is kind of in the description in this one

Support for 3090

Thank you making this tool for the rest of us that are clueless. Would it be possible to make it work for nvidia.de, and if so, what about a 3090? Would like to be prepared to grab one on the 24th. Appreciate any help

Unable to test notifications

Description

I changed the url for certain cards as suggested to test in stock alerts, for example:

    links: [
        {
            brand: 'evga',
            model: 'xc3 black',
            url: 'https://google.com',
            oosLabels: ['out of stock']
        },

But after running the program, this file is immediately replaced. Everything was working fine this morning before I took a pull. I'm currently on commit 5b91065

Also, not sure how to fix this, but I kept getting Error: Couldn't find a suitable audio player when I was able to successfully test this morning. How do I go about fixing this? What are compatible players or do I have to do something to set one up?

Further sorting by brand

Description

Hey, I love the code you've set up. Works great! However, I would like to suggest adding a way to look for specific cards.

Possible solution

I tried editing the javascript files for each store to only search for example the ftw3 by evga. But none of my changes get saved. Regardless, I hope this can be implemented if your time permits. Thanks!

Sound player issue

$ npm start

[email protected] start C:\Users\Jake\Documents\nvidia-snatcher
npm run build && node build/index.js

[email protected] build C:\Users\Jake\Documents\nvidia-snatcher
rimraf ./build && tsc

INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
[2:06:40 PM] info :: โœ– [amazon] still out of stock: pny xlr8
[2:06:41 PM] info :: โœ– [newegg] still out of stock: asus tuf
....

Hi I'm just confused on what this means. It prints it out every time I start the program. But the program seems to operate normally after..?

False positives with some vendors

Microcenter false positives was documented in the other open issue. Here are some other ones:

My settings are:

SHOW_ONLY_BRANDS="msi,evga,zotac"
STORES="nvidia,adorama,amazon,amazon-ca,asus,evga,microcenter,newegg,bandh,bestbuy"

Log

[12:46:19 PM] info :: ๐Ÿš€๐Ÿš€๐Ÿš€ [bestbuy] evga xc3 black IN STOCK ๐Ÿš€๐Ÿš€๐Ÿš€
[12:46:19 PM] info :: https://www.bestbuy.com/site/evga-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card/6432399.p?skuId=6432399
[12:46:23 PM] error :: An API error occurred: invalid_auth
[12:46:23 PM] info :: โœ” Pushover notification sent: {"status":1,"request":"c8c84310-6a08-4ac2-bedf-518a65b43b71"}
[12:46:24 PM] info :: โœ– [adorama] still out of stock: msi gaming x trio
[12:46:24 PM] info :: โœ” email sent: 250 2.0.0 OK 1600620384 i187sm6995167qke.43 - gsmtp
[12:46:24 PM] info :: โœ– [evga] still out of stock: evga xc3 black
[12:46:25 PM] info :: โœ” sms sent: 250 2.0.0 OK 1600620385 f24sm4213461qkk.136 - gsmtp
[12:46:26 PM] info :: โœ– [amazon-ca] still out of stock: msi gaming x trio
[12:46:26 PM] info :: ๐Ÿš€๐Ÿš€๐Ÿš€ [bestbuy] evga xc3 ultra IN STOCK ๐Ÿš€๐Ÿš€๐Ÿš€
[12:46:26 PM] info :: https://www.bestbuy.com/site/evga-geforce-rtx-3080-10gb-gddr6x-pci-express-4-0-graphics-card/6432400.p?skuId=6432400
[12:46:27 PM] info :: โœ” playing sound
[12:46:28 PM] error :: An API error occurred: invalid_auth
[12:46:29 PM] info :: ๐Ÿš€๐Ÿš€๐Ÿš€ [microcenter] evga xc3 ultra IN STOCK ๐Ÿš€๐Ÿš€๐Ÿš€
[12:46:29 PM] info :: https://www.microcenter.com/product/628344/evga-geforce-rtx-3080-xc3-ultra-gaming-triple-fan-10gb-gddr6x-pcie-40-graphics-card
[12:46:29 PM] info :: โœ– [bandh] still out of stock: zotac trinity
[12:46:29 PM] info :: โœ” Pushover notification sent: {"status":1,"request":"f77b1914-2108-4307-82cb-04833b7c9ceb"}
[12:46:30 PM] info :: โœ” sms sent: 250 2.0.0 OK 1600620389 25sm6876573qks.41 - gsmtp
[12:46:30 PM] info :: โœ” email sent: 250 2.0.0 OK 1600620390 134sm6703711qkj.53 - gsmtp
[12:46:30 PM] error :: An API error occurred: invalid_auth
[12:46:30 PM] info :: โœ” Pushover notification sent: {"status":1,"request":"d2f4d5d0-8603-4669-ae73-7f7e01b12620"}
[12:46:31 PM] info :: โœ” email sent: 250 2.0.0 OK 1600620391 d12sm6940834qka.34 - gsmtp
[12:46:31 PM] info :: โœ” sms sent: 250 2.0.0 OK 1600620391 201sm6781023qkf.103 - gsmtp
[12:46:32 PM] info :: โœ– [amazon] still out of stock: msi gaming x trio
[12:46:33 PM] info :: โœ” playing sound
[12:46:34 PM] info :: โœ” playing sound
[12:46:36 PM] info :: ๐Ÿš€๐Ÿš€๐Ÿš€ [bestbuy] msi ventus 3x oc IN STOCK ๐Ÿš€๐Ÿš€๐Ÿš€
[12:46:36 PM] info :: https://www.bestbuy.com/site/msi-geforce-rtx-3080-ventus-3x-10g-oc-bv-gddr6x-pci-express-4-0-graphic-card-black-silver/6430175.p?skuId=6430175
[12:46:38 PM] error :: An API error occurred: invalid_auth
[12:46:38 PM] info :: โœ” Pushover notification sent: {"status":1,"request":"a1c30c99-b211-43e5-a750-56df3ae02c2b"}
[12:46:40 PM] info :: โœ” sms sent: 250 2.0.0 OK 1600620400 r2sm7535113qti.92 - gsmtp
[12:46:40 PM] info :: โœ– [adorama] still out of stock: evga ftw3 ultra
[12:46:40 PM] info :: โœ” email sent: 250 2.0.0 OK 1600620400 v131sm7191092qkb.15 - gsmtp
[12:46:41 PM] info :: ๐Ÿš€๐Ÿš€๐Ÿš€ [microcenter] msi ventus 3x IN STOCK ๐Ÿš€๐Ÿš€๐Ÿš€
[12:46:41 PM] info :: https://www.microcenter.com/product/628331/msi-geforce-rtx-3080-ventus-3x-overclocked-triple-fan-10gb-gddr6x-pcie-40-graphics-card
[12:46:42 PM] error :: An API error occurred: invalid_auth
[12:46:42 PM] info :: โœ” Pushover notification sent: {"status":1,"request":"b68a0f78-fa19-4520-8871-c90d73b034df"}
[12:46:42 PM] info :: โœ– [newegg] still out of stock: evga xc3 black
[12:46:43 PM] info :: โœ” playing sound
[12:46:43 PM] info :: โœ” sms sent: 250 2.0.0 OK 1600620403 2sm7441900qtg.20 - gsmtp
[12:46:43 PM] info :: โœ” email sent: 250 2.0.0 OK 1600620403 f76sm6753230qke.19 - gsmtp
[12:46:44 PM] info :: โœ– [amazon-ca] still out of stock: evga ftw3
[12:46:46 PM] info :: โœ” playing sound

Sound not playing

With the latest the sound stop working for me. I fixed it by editing

notification.ts

removed

if (notifications.playSound === 'true') {
	playSound();
}

And Changed

if (notifications.email.username && notifications.email.password) {
	playSound();
	sendEmail(cartUrl);
}

Sound playing again. something with the if statement is not working right???

bug: Very high false positive rate due to API key rate limiting

Description

I just got the script and tried it with this .env:

NOTIFICATION_TEST="false"
PAGE_TIMEOUT="30000"
RATE_LIMIT_TIMEOUT="5000"
STORES="nvidia"

Every 30 seconds (about every 5 requests) I get a false positive because the page returns Rate limit exceeded for API_KEY [9485fa7b159e42edb08a83bde0d83dia]. (Confirmed this by looking at the screenshot it took.)

Possible solution

Ignore the page when it says "Rate limit exceeded". Maybe print a warning to console too.

add evga site

Description

EVGA has a store page that should be scraped

Possible solution

Add https://www.evga.com/products/productlist.aspx?type=0&family=GeForce+30+Series+Family&chipset=RTX+3080 to the list.

Script stops randomly

Description

Script stops randomly and just sits there no error or log

Possible solution

Have it record the last whatever number of steps taken before the script is stopped so we can trace it

Microcenter in stock detection is broken

Description

The lookup function is using all else cases as a positive results, which not the case for all. In this case, Microcenter is being falsely identified as in stock.

Possible solution

Modify the models to add an "availableLabel" (possibly as a regex string). Use regex string to detect "add to cart" or such to allow for actual positive results.

Issue when testing new notification system

Description

Stdout of failure:

$ npm run test:notification

[email protected] test:notification C:\Users\Jake\Documents\nvidia-snatcher
npm run build && node build/test/*.js

[email protected] build C:\Users\Jake\Documents\nvidia-snatcher
rimraf ./build && tsc

internal/modules/cjs/loader.js:968
throw err;
^

Error: Cannot find module 'C:\Users\Jake\Documents\nvidia-snatcher\build_test_*.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:notification: npm run build && node build/__test__/*.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:notification script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jake\AppData\Roaming\npm-cache_logs\2020-09-20T17_30_20_350Z-debug.log

Debug Log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test:notification'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [
4 verbose run-script 'pretest:notification',
4 verbose run-script 'test:notification',
4 verbose run-script 'posttest:notification'
4 verbose run-script ]
5 info lifecycle [email protected]pretest:notification: [email protected]
6 info lifecycle [email protected]
test:notification: [email protected]
7 verbose lifecycle [email protected]test:notification: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
test:notification: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Jake\Documents\nvidia-snatcher\node_modules.bin;C:\Users\Jake\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Jake\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\Jake\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\Jake\AppData\Local\Programs\Python\Python38;C:\Users\Jake\AppData\Local\Microsoft\WindowsApps;C:\Users\Jake\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle [email protected]test:notification: CWD: C:\Users\Jake\Documents\nvidia-snatcher
10 silly lifecycle [email protected]
test:notification: Args: [ '/d /s /c', 'npm run build && node build/test/*.js' ]
11 silly lifecycle [email protected]test:notification: Returned: code: 1 signal: null
12 info lifecycle [email protected]
test:notification: Failed to exec test:notification script
13 verbose stack Error: [email protected] test:notification: npm run build && node build/__test__/*.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\Jake\Documents\nvidia-snatcher
16 verbose Windows_NT 10.0.19041
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test:notification"
18 verbose node v12.18.4
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] test:notification: npm run build && node build/__test__/*.js
22 error Exit status 1
23 error Failed at the [email protected] test:notification script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Possible solution

Not sure if it's on my end. But it worked before when I just did it through .env file.

Suggestion: Move lookup logic

Description

After taking a look at #64, I think it would be a good idea to move the lookup logic to the Store interface, and force all of the different stores to implement their own lookup. This change will probably be necessary if the project is looking at having different approaches for checking stock at different stores (apis, full page scraping, element scraping).

I don't mind implementing this; just looking for feedback/a green light if I choose to do continue so I don't waste anyone's time.

Pushover-notifications doesn't work.

Description

Whenever the program tries to trigger a notification or tries to open the browser, the program error codes.

Error: application token is invalid
at Pushover.errors (C:...\nvidia-snatcher\node_modules\pushover-notifications\lib\pushover.js:146:13)
at IncomingMessage. (C:...\nvidia-snatcher\node_modules\pushover-notifications\lib\pushover.js:250:12)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1220:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: npm run build && node build/index.js "run"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Possible solution

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.