jef / streetmerchant

🤖 The world's easiest, most powerful stock checker
https://jef.buzz/streetmerchant
MIT License
4.97k stars 1.3k forks source link

dotenv settings dont seem to be activating #1531

Closed ItsKarder closed 3 years ago

ItsKarder commented 3 years ago

Expected Behavior

should only be looking for specific series, and then sending notifications to email and sms and playing a sound. have not messed with any stuff like this since high school so i probably messed up somewhere

Current Behavior

the program seems to run a defaul settings, scraping all series and not sending notifications or playing notification sound

Steps to Reproduce

Environment

latest windows 10: dotenv file:

All configuration variables are optional

Copy this file and name it as dotenv (without backticks)

Read https://jef.codes/streetmerchant/getting-started/#customization for help on customizing this file

########################################################################################################

ASCII_BANNER="" ASCII_COLOR="" AUTO_ADD_TO_CART="" BROWSER_TRUSTED="" COUNTRY="USA" DESKTOP_NOTIFICATIONS="" DISCORD_NOTIFY_GROUP="" DISCORD_NOTIFY_GROUP_3060TI="" DISCORD_NOTIFY_GROUP_3070="" DISCORD_NOTIFY_GROUP_3080="" DISCORD_NOTIFY_GROUP_3090="" DISCORD_NOTIFY_GROUP_CORSAIR_SF="" DISCORD_NOTIFY_GROUP_RX6800="" DISCORD_NOTIFY_GROUP_RX6800XT="" DISCORD_NOTIFY_GROUP_RX6900XT="" DISCORD_NOTIFY_GROUP_RYZEN5600="" DISCORD_NOTIFY_GROUP_RYZEN5800="" DISCORD_NOTIFY_GROUP_RYZEN5900="" DISCORD_NOTIFY_GROUP_RYZEN5950="" DISCORD_NOTIFY_GROUP_SONYPS5C="" DISCORD_NOTIFY_GROUP_SONYPS5DE="" DISCORD_NOTIFY_GROUP_XBOXSX="" DISCORD_NOTIFY_GROUP_XBOXSS="" DISCORD_NOTIFY_GROUP_TEST="" DISCORD_WEB_HOOK="" EMAIL_PASSWORD="password" EMAIL_TO="myemail@gmail.com" <--- (changed for privacy, formatted same way) EMAIL_USERNAME="myemail@gmail.com" HEADLESS="" IN_STOCK_WAIT_TIME="" LOG_LEVEL="" LOW_BANDWIDTH="" MAX_PRICE_SERIES_3060TI="" MAX_PRICE_SERIES_3070="750" MAX_PRICE_SERIES_3080="1000" MAX_PRICE_SERIES_3090="1600" MAX_PRICE_SERIES_CORSAIR_SF="" MAX_PRICE_SERIES_RX6800="600" MAX_PRICE_SERIES_RX6800XT="750" MAX_PRICE_SERIES_RX6900XT="1000" MAX_PRICE_SERIES_RYZEN5600="" MAX_PRICE_SERIES_RYZEN5800="" MAX_PRICE_SERIES_RYZEN5900="" MAX_PRICE_SERIES_RYZEN5950="" MAX_PRICE_SERIES_SONYPS5C="" MAX_PRICE_SERIES_SONYPS5DE="" MAX_PRICE_SERIES_XBOXSS="" MAX_PRICE_SERIES_XBOXSX="" MAX_PRICE_SERIES_TEST="" MICROCENTER_LOCATION="" MQTT_BROKER_ADDRESS="" MQTT_BROKER_PORT="" MQTT_CLIENT_ID="" MQTT_PASSWORD="" MQTT_QOS="" MQTT_TOPIC="" MQTT_USERNAME="" NVIDIA_ADD_TO_CART_ATTEMPTS="" NVIDIA_SESSION_TTL="" OPEN_BROWSER="true" PAGE_BACKOFF_MIN="" PAGE_BACKOFF_MAX="" PAGE_SLEEP_MIN="30000" PAGE_SLEEP_MAX="" PAGE_TIMEOUT="" PAGERDUTY_INTEGRATION_KEY="" PAGERDUTY_SEVERITY="" PHILIPS_HUE_API_KEY="" PHILIPS_HUE_CLOUD_ACCESS_TOKEN="" PHILIPS_HUE_CLOUD_CLIENT_ID="" PHILIPS_HUE_CLOUD_CLIENT_SECRET="" PHILIPS_HUE_CLOUD_REFRESH_TOKEN="" PHILIPS_HUE_LAN_BRIDGE_IP="" PHILIPS_HUE_LIGHT_COLOR="" PHILIPS_HUE_LIGHT_IDS="" PHILIPS_HUE_LIGHT_PATTERN="" PHONE_CARRIER="Carrier" PHONE_NUMBER="1231231234" <----(changed for privacy, tried with and without country code) PLAY_SOUND="notification.mp3" PROXY_ADDRESS="" PROXY_PROTOCOL="" PROXY_PORT="" PUSHBULLET="" PUSHOVER_EXPIRE="" PUSHOVER_RETRY="" PUSHOVER_TOKEN="" PUSHOVER_USER="" PUSHOVER_PRIORITY="" SCREENSHOT="" SHOW_ONLY_BRANDS="" SHOW_ONLY_MODELS="" SHOW_ONLY_SERIES="3060ti,3070,3080,3090,5800x,5900x" SLACK_CHANNEL="" SLACK_TOKEN="" SMTP_ADDRESS="" SMTP_PORT="" STORES="" TELEGRAM_ACCESS_TOKEN="" TELEGRAM_CHAT_ID="" TWILIO_ACCOUNT_SID="" TWILIO_AUTH_TOKEN="" TWILIO_FROM_NUMBER="" TWILIO_TO_NUMBER="" TWITCH_ACCESS_TOKEN="" TWITCH_CHANNEL="" TWITCH_CLIENT_ID="" TWITCH_CLIENT_SECRET="" TWITCH_REFRESH_TOKEN="" TWITTER_ACCESS_TOKEN_KEY="" TWITTER_ACCESS_TOKEN_SECRET="" TWITTER_CONSUMER_KEY="" TWITTER_CONSUMER_SECRET="" TWITTER_TWEET_TAGS="" WEB_PORT=""

Logs

C:\streetmerchant>npm run start

streetmerchant@ start C:\streetmerchant npm run build && node build/index.js

build tsc

STREETMERCHANT 3.3.0

[12:38:47 AM] info :: ℹ selected stores: amazon, bestbuy [12:38:47 AM] info :: ℹ selected series: 3060ti, 3070, 3080, 3090, rx6800, rx6800xt, rx6900xt, ryzen5600, ryzen5800, ryzen5900, ryzen5950, sonyps5c, sonyps5de, xboxss, xboxsx [12:39:01 AM] info :: ✖ [amazon] [asus (3060ti)] dual :: OUT OF STOCK [12:39:03 AM] info :: ✖ [bestbuy] [nvidia (3070)] founders edition :: OUT OF STOCK

everything scrapes normally after this, even got a few hits on some radeon gpus, but they are overpriced by about 700 dollars because my price caps are not working

SirLostSpirit commented 3 years ago

You may not be using the correct series descriptors as listed on https://jef.codes/streetmerchant/reference/filter/ Scroll down to where it says "Supported Series." Spaces may also be advised, but I'm not certain if this is correct or not.

5800x should be "ryzen5800" 5900x should be "ryzen5900"

As an example It should look something like this: SHOW_ONLY_SERIES="3060ti, 3070, ryzen5600"

neatchee commented 3 years ago

The dotenv you provided also has no stores listed

ThreeHAN commented 3 years ago

The new dotenv file does not come with "" anymore. Are you sure you are up to date with the latest version?

neatchee commented 3 years ago

The new dotenv file does not come with "" anymore. Are you sure you are up to date with the latest version?

Quotation marks are still (mostly) supported; lots of people copied their old .env to dotenv. It shouldn't make a difference (though in some cases it does in small ways, e.g. whether you need a space after a comma)

yizy60 commented 3 years ago

I had the same problem. Fixed it by leaving the file type the same and naming it "dotenv". Do not change this file to .env file type.

eisn7311 commented 3 years ago

Bump on this, I am having the same problem. File is named "dotenv" but still does not work.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

BRT917 commented 3 years ago

I am experiencing the exact same issue on Windows 10 running streetmerchant v3.4.1 freshly cloned today. Node.js v14.16.0

Copied dotenv-example to dotenv

the only lines I changed were:

SHOW_ONLY_SERIES=3060ti,3070
STORES=adorama,amazon,asus,corsair,evga,gamestop,newegg,pny,target,walmart,zotac,bandh,toysrus

using npm run start:dev it does restart when I make changes to dotenv

Startup still displays:

PS C:\dev\streetmerchant> npm run start:dev

> streetmerchant@ start:dev C:\dev\streetmerchant
> nodemon --config nodemon.json

[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src\**\* dotenv
[nodemon] watching extensions: ts
[nodemon] starting `ts-node --files ./src/index`
STREETMERCHANT
3.4.1

[10:00:29 AM] info :: ℹ selected stores: amazon, bestbuy
[10:00:29 AM] info :: ℹ selected series: 3060ti, 3070, 3080, 3090, rx6800, rx6800xt, rx6900xt, ryzen5600, ryzen5800, ryzen5900, ryzen5950, sf, sonyps5c, sonyps5de, xboxss, xboxsx
k00k commented 3 years ago

Same problem for me on Windows 10. Just cloned today. Node.js v14.16.0 as well. No changes I've made to dotenv seem to work:

...
SHOW_ONLY_BRANDS=corsair,asus,gigabyte,zotac,evga,msi
SHOW_ONLY_MODELS=
SHOW_ONLY_SERIES=3070,3080,sf
SLACK_CHANNEL=
SLACK_TOKEN=
SMARTTHINGS_TOKEN=
SMARTTHINGS_SWITCH_LABEL=
SMTP_ADDRESS=
SMTP_PORT=
STORES=bestbuy,amazon,bandh,adorama,newegg,evga,zotac,asus
...

This seems to be when running with nodemon watching for changes via npm run start:dev. Seems ok if I do a npm run start

LvlUpGuy commented 3 years ago

This seems to be when running with nodemon watching for changes via npm run start:dev. Seems ok if I do a npm run start

This is key. I was able to get mine working as well if I stopped passing the dev. This is less than ideal at the moment but does seem to work.

petar-staynov commented 3 years ago

I have the same problem. image

`# All configuration variables are optional ########################################################################################################

ASCII_BANNER= ASCII_COLOR= APNS_AUTHKEY= APNS_BUNDLEID= APNS_DEVICETOKEN= APNS_KEYID= APNS_PRODUCTION= APNS_TEAMID= AUTO_ADD_TO_CART= BROWSER_TRUSTED= DESKTOP_NOTIFICATIONS= DISCORD_NOTIFY_GROUP= DISCORD_NOTIFY_GROUP_3060= DISCORD_NOTIFY_GROUP_3060TI= DISCORD_NOTIFY_GROUP_3070= DISCORD_NOTIFY_GROUP_3080= DISCORD_NOTIFY_GROUP_3090= DISCORD_NOTIFY_GROUP_CORSAIR_SF= DISCORD_NOTIFY_GROUP_RX6800= DISCORD_NOTIFY_GROUP_RX6800XT= DISCORD_NOTIFY_GROUP_RX6900XT= DISCORD_NOTIFY_GROUP_RYZEN5600= DISCORD_NOTIFY_GROUP_RYZEN5800= DISCORD_NOTIFY_GROUP_RYZEN5900= DISCORD_NOTIFY_GROUP_RYZEN5950= DISCORD_NOTIFY_GROUP_SONYPS5C= DISCORD_NOTIFY_GROUP_SONYPS5DE= DISCORD_NOTIFY_GROUP_XBOXSX= DISCORD_NOTIFY_GROUP_XBOXSS= DISCORD_NOTIFY_GROUP_TEST= DISCORD_WEB_HOOK= EMAIL_USERNAME: EMAIL_PASSWORD: EMAIL_TO: 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= MAX_PRICE_SERIES_CORSAIR_SF= MAX_PRICE_SERIES_RX6800= MAX_PRICE_SERIES_RX6800XT= MAX_PRICE_SERIES_RX6900XT= MAX_PRICE_SERIES_RYZEN5600= MAX_PRICE_SERIES_RYZEN5800= MAX_PRICE_SERIES_RYZEN5900= MAX_PRICE_SERIES_RYZEN5950= MAX_PRICE_SERIES_SONYPS5C= MAX_PRICE_SERIES_SONYPS5DE= MAX_PRICE_SERIES_XBOXSS= MAX_PRICE_SERIES_XBOXSX= MAX_PRICE_SERIES_TEST= MICROCENTER_LOCATION= MQTT_BROKER_ADDRESS= MQTT_BROKER_PORT= MQTT_CLIENT_ID= MQTT_PASSWORD= MQTT_QOS= MQTT_TOPIC= MQTT_USERNAME= OPEN_BROWSER= PAGE_BACKOFF_MIN= PAGE_BACKOFF_MAX= PAGE_SLEEP_MIN= PAGE_SLEEP_MAX= PAGE_TIMEOUT= PAGERDUTY_INTEGRATION_KEY= PAGERDUTY_SEVERITY= PHILIPS_HUE_API_KEY= PHILIPS_HUE_CLOUD_ACCESS_TOKEN= PHILIPS_HUE_CLOUD_CLIENT_ID= PHILIPS_HUE_CLOUD_CLIENT_SECRET= PHILIPS_HUE_CLOUD_REFRESH_TOKEN= PHILIPS_HUE_LAN_BRIDGE_IP= PHILIPS_HUE_LIGHT_COLOR= PHILIPS_HUE_LIGHT_IDS= PHILIPS_HUE_LIGHT_PATTERN= PHONE_CARRIER= PHONE_NUMBER= PLAY_SOUND= PROXY_ADDRESS= PROXY_PROTOCOL= PROXY_PORT= PUSHBULLET= PUSHOVER_EXPIRE= PUSHOVER_RETRY= PUSHOVER_TOKEN= PUSHOVER_USER= PUSHOVER_PRIORITY= RESTART_TIME= SCREENSHOT= SHOW_ONLY_BRANDS= SHOW_ONLY_MODELS= SHOW_ONLY_SERIES:3060ti,3070,3080,3090 SLACK_CHANNEL= SLACK_TOKEN= SMARTTHINGS_TOKEN= SMARTTHINGS_SWITCH_LABEL= SMTP_ADDRESS= SMTP_PORT= STORES:amazon-de,amazon-de-warehouse,amazon-fr,amazon-it,amazon-nl,nvidia-de,nvidia-fr,nvidia-sp,saturn,proshop-de,notebooksbilliger,mediamarkt,alternate TELEGRAM_ACCESS_TOKEN= TELEGRAM_CHAT_ID= TWILIO_ACCOUNT_SID= TWILIO_AUTH_TOKEN= TWILIO_FROM_NUMBER= TWILIO_TO_NUMBER= TWITCH_ACCESS_TOKEN= TWITCH_CHANNEL= TWITCH_CLIENT_ID= TWITCH_CLIENT_SECRET= TWITCH_REFRESH_TOKEN= TWITTER_ACCESS_TOKEN_KEY= TWITTER_ACCESS_TOKEN_SECRET= TWITTER_CONSUMER_KEY= TWITTER_CONSUMER_SECRET= TWITTER_TWEET_TAGS= STREAMLABS_ACCESS_TOKEN= STREAMLABS_TYPE= STREAMLABS_IMAGE= STREAMLABS_SOUND= STREAMLABS_DURATION= WEB_PORT= ` Result: image

Notmeagain commented 3 years ago

I have a solution:

Modify your nodemon.json file to instruct nodemon to require dotenv/config package.

{ "exec": "ts-node -r dotenv/config --files ./src/index", "ext": "ts", "watch": [ "src/", "dotenv" ] }

eisn7311 commented 3 years ago

I have a solution:

Modify your nodemon.json file to instruct nodemon to require dotenv/config package.

{ "exec": "ts-node -r dotenv/config --files ./src/index", "ext": "ts", "watch": [ "src/", "dotenv" ] }

It worked! Notmeagain=smartest man alive

reapo commented 3 years ago

I have a solution:

Modify your nodemon.json file to instruct nodemon to require dotenv/config package.

{ "exec": "ts-node -r dotenv/config --files ./src/index", "ext": "ts", "watch": [ "src/", "dotenv" ] }

I tried this and it didn't work for me. I have a default setup, with only these 2 lines changed:

SHOW_ONLY_SERIES=3080 STORES=alternate,amazon-de,amazon-de-warehouse

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days

github-actions[bot] commented 3 years ago

This issue has been closed because it is stale. Reopen if necessary.