feat: custom user agent (#121)

Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
admon84
2020-09-20 13:56:47 -06:00
committed by GitHub
parent 252459d5d3
commit d9be3fe618
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -21,3 +21,4 @@ STORES="bestbuy,bandh,nvidia"
SCREENSHOT="true"
TELEGRAM_ACCESS_TOKEN=""
TELEGRAM_CHAT_ID="1234"
USER_AGENT="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
+3
View File
@@ -85,9 +85,12 @@ Here is a list of variables that you can use to customize your newly copied `.en
| `SCREENSHOT` | Capture screenshot of page if a card is found | Default: `true` |
| `TELEGRAM_ACCESS_TOKEN` | Telegram access token |
| `TELEGRAM_CHAT_ID` | Telegram chat ID |
| `USER_AGENT` | Custom User-Agent header for HTTP requests; optional |
> :point_right: If you have multi-factor authentication (MFA), you will need to create an [app password](https://myaccount.google.com/apppasswords) and use this instead of your Gmail password.
> :point_right: You can find your computer's user agent by [searching google for "my user agent"](http://google.com/search?q=my+user+agent)
> :point_right: You can test your notification configuration by running `npm run test:notification`.
#### Supported stores
+1 -1
View File
@@ -55,7 +55,7 @@ const page = {
width: 1920,
height: 1080,
navigationTimeout: Number(process.env.PAGE_TIMEOUT ?? 30000),
userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'
userAgent: process.env.USER_AGENT ?? 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'
};
const store = {