+4
-4
@@ -5,8 +5,8 @@
|
|||||||
"SUK": "4510772220101",
|
"SUK": "4510772220101",
|
||||||
"salestart": "2023-01-19",
|
"salestart": "2023-01-19",
|
||||||
"ZH": "熱血硬派國夫君外傳 熱血少女1+2",
|
"ZH": "熱血硬派國夫君外傳 熱血少女1+2",
|
||||||
"EN": " ",
|
"EN": "River City Girls 1 & 2",
|
||||||
"JP": " ",
|
"JP": "熱血硬派くにおくん外伝 リバーシティガールズ1・2",
|
||||||
"TAG1": "日版",
|
"TAG1": "日版",
|
||||||
"TAG2": "中文",
|
"TAG2": "中文",
|
||||||
"TAG3": "日文"
|
"TAG3": "日文"
|
||||||
@@ -40,10 +40,10 @@
|
|||||||
"type": "NS",
|
"type": "NS",
|
||||||
"SUK": "4570045990018",
|
"SUK": "4570045990018",
|
||||||
"salestart": "2023-03-14",
|
"salestart": "2023-03-14",
|
||||||
"ZH": " ",
|
"ZH": "大鳥琥珀與刻之劍",
|
||||||
"EN": " ",
|
"EN": " ",
|
||||||
"JP": " ",
|
"JP": " ",
|
||||||
"TAG1": "大鳥琥珀與刻之劍",
|
"TAG1": " ",
|
||||||
"TAG2": "日版",
|
"TAG2": "日版",
|
||||||
"TAG3": "中文"
|
"TAG3": "中文"
|
||||||
},
|
},
|
||||||
|
|||||||
+75
@@ -0,0 +1,75 @@
|
|||||||
|
import requests
|
||||||
|
import json
|
||||||
|
print("begin")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
f1=open("database/switch_1688043588.json",'r',encoding='utf8')
|
||||||
|
j_ima=json.loads(f1.read())
|
||||||
|
|
||||||
|
f=open("NS_temp1.json",'r',encoding='utf8')
|
||||||
|
jsdata=json.loads(f.read())
|
||||||
|
items=[]
|
||||||
|
for i in range(259):
|
||||||
|
jstemp={}
|
||||||
|
jstemp['platform']=jsdata[str(i)]['type']
|
||||||
|
jstemp['SUK']=jsdata[str(i)]['SUK']
|
||||||
|
jstemp['salestart']=jsdata[str(i)]['salestart']
|
||||||
|
|
||||||
|
jstemp['mainphoto']="images/"+j_ima['item_list'][i]['main_photo']
|
||||||
|
|
||||||
|
|
||||||
|
i_name=[]
|
||||||
|
i_name_temp={}
|
||||||
|
if jsdata[str(i)]['ZH'] != " ":
|
||||||
|
i_name_temp['region']="ZH"
|
||||||
|
i_name_temp['name']=jsdata[str(i)]['ZH']
|
||||||
|
i_name.append(i_name_temp)
|
||||||
|
i_name_temp={}
|
||||||
|
if jsdata[str(i)]['EN'] != " ":
|
||||||
|
i_name_temp['region']="EN"
|
||||||
|
i_name_temp['name']=jsdata[str(i)]['EN']
|
||||||
|
i_name.append(i_name_temp)
|
||||||
|
i_name_temp={}
|
||||||
|
if jsdata[str(i)]['JP'] != " ":
|
||||||
|
i_name_temp['region']="JP"
|
||||||
|
i_name_temp['name']=jsdata[str(i)]['JP']
|
||||||
|
i_name.append(i_name_temp)
|
||||||
|
i_name_temp={}
|
||||||
|
if "HK" in jsdata[str(i)]:
|
||||||
|
i_name_temp['region']="HK"
|
||||||
|
i_name_temp['name']=jsdata[str(i)]['HK']
|
||||||
|
i_name.append(i_name_temp)
|
||||||
|
|
||||||
|
bb=0
|
||||||
|
cc={}
|
||||||
|
for aa in i_name:
|
||||||
|
cc[str(bb)]=aa
|
||||||
|
bb+=1
|
||||||
|
jstemp['names']=json.dumps(i_name,ensure_ascii=False,)
|
||||||
|
|
||||||
|
|
||||||
|
i_tag=[]
|
||||||
|
if jsdata[str(i)]['TAG1'] != " ":
|
||||||
|
i_tag.append(jsdata[str(i)]['TAG1'])
|
||||||
|
if jsdata[str(i)]['TAG2'] != " ":
|
||||||
|
i_tag.append(jsdata[str(i)]['TAG2'])
|
||||||
|
if jsdata[str(i)]['TAG3'] != " ":
|
||||||
|
i_tag.append(jsdata[str(i)]['TAG3'])
|
||||||
|
|
||||||
|
jstemp['tags']=json.dumps(i_tag,ensure_ascii=False)
|
||||||
|
items.append(jstemp)
|
||||||
|
|
||||||
|
#print(items[0])
|
||||||
|
|
||||||
|
url='http://beta.lmve.net/index.php?app=pricetrend&ac=do&ts=add_item'
|
||||||
|
|
||||||
|
|
||||||
|
for i in items:
|
||||||
|
file={
|
||||||
|
"mainphoto":open(i['mainphoto'],'rb')
|
||||||
|
}
|
||||||
|
r=requests.post(url,i,files=file)
|
||||||
|
if(r.status_code==200):
|
||||||
|
htmlx=r.text
|
||||||
|
print(htmlx)
|
||||||
Reference in New Issue
Block a user