Multi GPU merge #10

Merged
Djeex merged 10 commits from wip into main 2025-07-08 19:15:29 +02:00
3 changed files with 150 additions and 118 deletions
Showing only changes of commit 0eb569f7ec - Show all commits

View File

@ -51,8 +51,9 @@ services:
container_name: nvidia-stock-bot container_name: nvidia-stock-bot
restart: unless-stopped restart: unless-stopped
environment: environment:
- PRODUCT_NAMES= # Exact GPU name (e.g. "RTX 5080, RTX 5090")
- DISCORD_ROLES= # List of Discord roles ID (e.g. "<@&12345>, <@&6789>"), in the same order than PRODUCT_NAMES values. @everyone by default.
- DISCORD_WEBHOOK_URL= # Your Discord webhook URL - DISCORD_WEBHOOK_URL= # Your Discord webhook URL
- PRODUCT_NAME= # Exact GPU name like "RTX 5080"
- API_URL_SKU= # API listing the product - API_URL_SKU= # API listing the product
- API_URL_STOCK= # API providing stock data - API_URL_STOCK= # API providing stock data
- PRODUCT_URL= # GPU purchase URL - PRODUCT_URL= # GPU purchase URL
@ -65,15 +66,15 @@ services:
| Variable | Description | Possible Values | Default Value | | Variable | Description | Possible Values | Default Value |
|---------------------|-------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| |---------------------|-------------------------------------------------|------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| DISCORD_WEBHOOK_URL | Your Discord webhook URL | A valid URL | | | `DISCORD_WEBHOOK_URL` | Your Discord webhook URL | A valid URL | |
| DISCORD_ROLE | Role ID, found in your discord server settings (with developer mode enabled) | <@&123456789> | @everyone | | `PRODUCT_NAMES` | The exact GPU names you're searching for | `RTX 5080, RTX 5090` | |
| REFRESH_TIME | Script refresh interval in seconds | `60`, `30`, etc. | `30` | | `DISCORD_ROLE>` | 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 |
| API_URL_SKU | API listing the product | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (for exemple : `locale=en-gb`) | `https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia` | | `REFRESH_TIME` | Script refresh interval in seconds | `60`, `30`, etc. | `30` |
| API_URL_STOCK | API providing stock data | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (for exemple : `locale=en-gb`) | `https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=` | | `API_URL_SKU` | API listing the product | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (for exemple : `locale=en-gb`) | `https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia` |
| PRODUCT_URL | GPU purchase URL | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (for exemple : `/en-gb/`) | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&manufacturer=NVIDIA` | | `API_URL_STOCK` | API providing stock data | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (for exemple : `locale=en-gb`) | `https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=` |
| PRODUCT_NAME | The exact GPU name you're searching for | `RTX 5090`, `RTX 5080`, `RTX 5070` | | | `PRODUCT_URL` | GPU purchase URL | A URL. API url can change over time. For now, you can use the default one and change the `locale` parameter to yours (for exemple : `/en-gb/`) | `https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&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` |
| PYTHONUNBUFFERED | Enables real-time log output | `1`, `0` | `1` | | `PYTHONUNBUFFERED` | Enables real-time log output | `1`, `0` | `1` |
**Run the image** **Run the image**
@ -147,12 +148,12 @@ git clone https://git.djeex.fr/Djeex/nvidia-stock-bot.git
```sh ```sh
export DISCORD_WEBHOOK_URL="https://your_discord_url" export DISCORD_WEBHOOK_URL="https://your_discord_url"
export DISCORD_ROLE="<@&123456789>" export PRODUCT_NAMES=RTX 5080, RTX 5090
export DISCORD_ROLES=<@&12345>, <@&6789>
export REFRESH_TIME="60" export REFRESH_TIME="60"
export API_URL_SKU="https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia&gpu=RTX%205080" export API_URL_SKU="https://api.nvidia.partners/edge/product/search?page=1&limit=100&locale=fr-fr&Manufacturer=Nvidia&gpu=RTX%205080"
export API_URL_STOCK="https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus=" export API_URL_STOCK="https://api.store.nvidia.com/partner/v1/feinventory?locale=fr-fr&skus="
export PRODUCT_URL="https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&gpu=RTX%205080&manufacturer=NVIDIA" export PRODUCT_URL="https://marketplace.nvidia.com/fr-fr/consumer/graphics-cards/?locale=fr-fr&page=1&limit=12&gpu=RTX%205080&manufacturer=NVIDIA"
export PRODUCT_NAME="RTX 5080"
export TEST_MODE=false export TEST_MODE=false
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
``` ```
@ -169,6 +170,13 @@ python nvidia-stock-bot.py
<img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-discord.png" alt="Nvidia Stock Bot - screenshots"> <img src="https://git.djeex.fr/Djeex/nvidia-stock-bot/raw/branch/main/assets/img/nvidia-stock-bot-discord.png" alt="Nvidia Stock Bot - screenshots">
</div> </div>
## Common issues
Error when trying to reach product API url :
- `API_SKU_URL` may be wrong
- Your IP may be blacklisted by nvidia. Try to use a VPN.
- nvidia API may be down
## 🧑‍💻 Contributors ## 🧑‍💻 Contributors
Thanks for their contributions: Thanks for their contributions:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 95 KiB