Commit 5cc8ea91 authored by 邱阿朋's avatar 邱阿朋

sku_relations

parent a9172148
...@@ -6,11 +6,11 @@ import requests ...@@ -6,11 +6,11 @@ import requests
def sku_relations(country_code): def sku_relations(country_code):
# 发送 GET 请求 # 发送 GET 请求
url = f"https://order.3oj.com/api/platform_sku_list?country_code={country_code}" url = f"https://order.3oj.com/api/platform_sku_list?country_code={country_code}"
response = requests.get(url) response = requests.get(url, proxies={"http": None, "https": None})
if response.status_code == 200: if response.status_code == 200:
# 将 JSON 响应解析为 Python 字典 # 将 JSON 响应解析为 Python 字典
data = response.json() data = response.json()
sku_list = data.get("data") sku_list = data.get("data")
return sku_list return sku_list
else: else:
raise Exception("获取sku关系异常") raise Exception("获取sku关系异常")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment