try2
This commit is contained in:
@@ -79,22 +79,11 @@ if match:
|
|||||||
else:
|
else:
|
||||||
wh_masked_url = "[Invalid webhook URL]"
|
wh_masked_url = "[Invalid webhook URL]"
|
||||||
|
|
||||||
# HTTP headers
|
# HTTP headers - no compression to avoid parsing issues
|
||||||
HEADERS = {
|
HEADERS = {
|
||||||
"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",
|
"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",
|
||||||
"Accept": "application/json, text/plain, */*",
|
"Accept": "application/json",
|
||||||
"Accept-Language": "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7",
|
"Referer": "https://partners.nvidia.com/"
|
||||||
"Accept-Encoding": "gzip, deflate, br, zstd",
|
|
||||||
"Referer": "https://partners.nvidia.com/",
|
|
||||||
"Origin": "https://partners.nvidia.com",
|
|
||||||
"Connection": "keep-alive",
|
|
||||||
"Sec-Fetch-Dest": "empty",
|
|
||||||
"Sec-Fetch-Mode": "cors",
|
|
||||||
"Sec-Ch-Ua": "\"Google Chrome\";v=\"131\", \"Chromium\";v=\"131\", \"Not.A/Brand\";v=\"24\"",
|
|
||||||
"Sec-Ch-Ua-Platform": "\"macOS\"",
|
|
||||||
"Cache-Control": "no-cache, no-store, must-revalidate",
|
|
||||||
"Pragma": "no-cache",
|
|
||||||
"Expires": "0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load country setting and localization config
|
# Load country setting and localization config
|
||||||
|
|||||||
@@ -41,7 +41,18 @@ def check_rtx_50_founders():
|
|||||||
time.sleep(random.uniform(10, 20))
|
time.sleep(random.uniform(10, 20))
|
||||||
return
|
return
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
data = response.json()
|
|
||||||
|
# Debug response content
|
||||||
|
logging.info(f"Content-Type: {response.headers.get('Content-Type')}")
|
||||||
|
logging.info(f"Content-Encoding: {response.headers.get('Content-Encoding')}")
|
||||||
|
logging.info(f"Response length: {len(response.content)}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
data = response.json()
|
||||||
|
except Exception as e:
|
||||||
|
logging.error(f"JSON decode error: {e}")
|
||||||
|
logging.error(f"Response content (first 200 chars): {response.text[:200]}")
|
||||||
|
return
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
logging.error(f"SKU API error: {e}")
|
logging.error(f"SKU API error: {e}")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user