Compare commits
3 Commits
v4.0.1
...
b3fe0fcf24
| Author | SHA1 | Date | |
|---|---|---|---|
| b3fe0fcf24 | |||
| 2484568e5f | |||
| 7f24145dc2 |
@@ -76,7 +76,7 @@ services:
|
|||||||
| `DISCORD_SERVER_NAME` | The name of your server, displayed in notification's footer | A text | Shared for free |
|
| `DISCORD_SERVER_NAME` | The name of your server, displayed in notification's footer | A text | Shared for free |
|
||||||
| `DISCORD_ROLES` | List of Discord roles ID in the same order than `PRODUCT_NAMES` values, found in your discord server settings (with user profile developer mode enabled) | `<@&12345><@&6789>` | @everyone |
|
| `DISCORD_ROLES` | List of Discord roles ID in the same order than `PRODUCT_NAMES` values, found in your discord server settings (with user profile developer mode enabled) | `<@&12345><@&6789>` | @everyone |
|
||||||
| `REFRESH_TIME` | Script refresh interval in seconds | `60`, `30`, etc. | `30` |
|
| `REFRESH_TIME` | Script refresh interval in seconds | `60`, `30`, etc. | `30` |
|
||||||
| `API_URL_SKU` | API listing the product. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | An URL | https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale={locale}&Manufacturer=Nvidia` |
|
| `API_URL_SKU` | API listing the product. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | An URL | `https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale={locale}&Manufacturer=Nvidia` |
|
||||||
| `API_URL_STOCK` | API providing stock data. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | A URL | `https://api.store.nvidia.com/partner/v1/feinventory?locale={locale}&skus=` |
|
| `API_URL_STOCK` | API providing stock data. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | A URL | `https://api.store.nvidia.com/partner/v1/feinventory?locale={locale}&skus=` |
|
||||||
| `PRODUCT_URL` | GPU purchase URL. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | A URL | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale={locale}&page=1&limit=12&manufacturer=NVIDIA` |
|
| `PRODUCT_URL` | GPU purchase URL. Use it for development purpose. __Warning__ : it will override the locale set by `COUNTRY`. | A URL | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale={locale}&page=1&limit=12&manufacturer=NVIDIA` |
|
||||||
| `TEST_MODE` | For testing without sending notifications | `True`, `False` | `False` |
|
| `TEST_MODE` | For testing without sending notifications | `True`, `False` | `False` |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import logging
|
|||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = "4.0.1"
|
VERSION = "4.0.2"
|
||||||
|
|
||||||
# Logger setup
|
# Logger setup
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
@@ -79,21 +79,17 @@ else:
|
|||||||
|
|
||||||
# HTTP headers
|
# HTTP headers
|
||||||
HEADERS = {
|
HEADERS = {
|
||||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
|
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
||||||
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
"Accept": "application/json, text/plain, */*",
|
||||||
"Chrome/131.0.0.0 Safari/537.36",
|
"Accept-Language": "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7",
|
||||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,"
|
|
||||||
"image/avif,image/webp,image/apng,*/*;q=0.8",
|
|
||||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
"Accept-Encoding": "gzip, deflate, br, zstd",
|
||||||
"Accept-Language": "en-US,en;q=0.5",
|
"Referer": "https://partners.nvidia.com/",
|
||||||
"Cache-Control": "max-age=0",
|
"Origin": "https://partners.nvidia.com",
|
||||||
"Connection": "keep-alive",
|
"Connection": "keep-alive",
|
||||||
"Sec-Fetch-Dest": "document",
|
"Sec-Fetch-Dest": "empty",
|
||||||
"Sec-Fetch-Mode": "navigate",
|
"Sec-Fetch-Mode": "cors",
|
||||||
"Sec-Fetch-Site": "none",
|
"Sec-Ch-Ua": "\"Google Chrome\";v=\"131\", \"Chromium\";v=\"131\", \"Not.A/Brand\";v=\"24\"",
|
||||||
"Sec-Fetch-User": "?1",
|
"Sec-Ch-Ua-Platform": "\"macOS\""
|
||||||
"Upgrade-Insecure-Requests": "1",
|
|
||||||
"Sec-GPC": "1",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load country setting and localization config
|
# Load country setting and localization config
|
||||||
|
|||||||
Reference in New Issue
Block a user