16 Commits

Author SHA1 Message Date
b3fe0fcf24 Merge pull request 'Fixed headers' (#23) from headers-fix into main
Reviewed-on: #23
2025-12-04 22:23:15 +01:00
2484568e5f Fixed headers 2025-12-04 21:20:50 +00:00
7f24145dc2 Minor changes 2025-10-03 13:31:00 +02:00
8f626a7737 Merge pull request 'Python 3.13 - Adress CVE vulnerabilities' (#22) from python3.13 into main
Reviewed-on: #22
2025-09-19 23:14:44 +02:00
4c57a3a310 Python 3.13 - Adress CVE vulnerabilities 2025-09-19 21:13:00 +00:00
407e27238f fixed typo 2025-08-06 07:34:56 +00:00
961c24a6c6 Better README 2025-07-13 15:02:55 +00:00
a16db7be01 Better formatting 2025-07-13 15:01:54 +00:00
92db785511 Fixed typo 2025-07-13 15:00:51 +00:00
1f3db4dec8 Renamed 2025-07-13 14:59:21 +00:00
004d227fd1 Fixed readme + docker compose 2025-07-12 22:48:17 +00:00
fc15c6fbbe Merge pull request 'v4.0 - Full localisation' (#21) from wip into main
Reviewed-on: #21
2025-07-12 23:50:41 +02:00
3ba8c86b53 Merge pull request 'Added DISCORD_NOTIFICATION_CURRENCY env var' (#20) from wip into main
Reviewed-on: #20
2025-07-12 15:15:13 +02:00
1b15946a55 Merge pull request 'Better default env var' (#19) from wip into main
Reviewed-on: #19
2025-07-12 13:20:50 +02:00
f2b5b184ea Merge pull request 'Modular python files' (#18) from wip into main
Reviewed-on: #18
2025-07-11 13:51:23 +02:00
70b723b781 Merge pull request 'v3.2.1 Hotfix - Fixed Discord role issues on SKU change + language fallback strategy' (#14) from wip into main
Reviewed-on: #14
2025-07-10 10:08:28 +02:00
5 changed files with 14 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
FROM python:3.11-alpine FROM python:3.13-alpine
RUN apk add --no-cache ca-certificates RUN apk add --no-cache ca-certificates

View File

@@ -11,14 +11,12 @@
**🤖 Nvidia Stock Bot** - A bot that alerts you in real-time about **Nvidia RTX FE** GPU stock availability through Discord notifications. **🤖 Nvidia Stock Bot** - A bot that alerts you in real-time about **Nvidia RTX FE** GPU stock availability through Discord notifications.
> [!NOTE] > [!NOTE]
>_Github repo is a mirror of https://git.djeex.fr/Djeex/nvidia-stock-bot. You'll find full package, history and release note there._ >_Github repo is a mirror of https://git.djeex.fr/Djeex/nvidia-stock-bot. You'll find full package, history and release note there. LLM used for bugs check and languages files generation._
>
>_LLM used for bugs check and languages files generation._
## 🖼️ Screenshots ## 🖼️ Screenshots
<div align="center" > <div align="center" >
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-discord.png?=1" alt="Nvidia Stock Bot - screenshots"> <img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-discord-screenshot.png" alt="Nvidia Stock Bot - screenshots">
</div> </div>
## 📌 Table of Contents ## 📌 Table of Contents
@@ -78,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` |

View File

@@ -4,7 +4,7 @@ import logging
import json import json
import sys import sys
VERSION = "4.0.0" 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

View File

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 257 KiB

View File

@@ -6,8 +6,6 @@ services:
env_file: env_file:
- .env - .env
environment: environment:
# Minimal environment variables
environment:
# Minimal environment variables # Minimal environment variables
- PRODUCT_NAMES=${PRODUCT_NAMES} - PRODUCT_NAMES=${PRODUCT_NAMES}
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL} - DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}