mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 04:07:36 +00:00
feat: custom user agent (#121)
Co-authored-by: Jef LeCompte <jeffreylec@gmail.com>
This commit is contained in:
@@ -21,3 +21,4 @@ STORES="bestbuy,bandh,nvidia"
|
|||||||
SCREENSHOT="true"
|
SCREENSHOT="true"
|
||||||
TELEGRAM_ACCESS_TOKEN=""
|
TELEGRAM_ACCESS_TOKEN=""
|
||||||
TELEGRAM_CHAT_ID="1234"
|
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"
|
||||||
|
|||||||
@@ -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` |
|
| `SCREENSHOT` | Capture screenshot of page if a card is found | Default: `true` |
|
||||||
| `TELEGRAM_ACCESS_TOKEN` | Telegram access token |
|
| `TELEGRAM_ACCESS_TOKEN` | Telegram access token |
|
||||||
| `TELEGRAM_CHAT_ID` | Telegram chat ID |
|
| `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: 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`.
|
> :point_right: You can test your notification configuration by running `npm run test:notification`.
|
||||||
|
|
||||||
#### Supported stores
|
#### Supported stores
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ const page = {
|
|||||||
width: 1920,
|
width: 1920,
|
||||||
height: 1080,
|
height: 1080,
|
||||||
navigationTimeout: Number(process.env.PAGE_TIMEOUT ?? 30000),
|
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 = {
|
const store = {
|
||||||
|
|||||||
Reference in New Issue
Block a user