淘宝API item_search_similar - 搜索相似的商品

淘宝API item_search_similar - 搜索相似的商品
在这里插入图片描述
Result Object:

{
“items”: {
“item”: [
{
“title”: “2件】男士短袖t恤2019新款夏季潮流潮牌宽松打底衫纯棉衣服体恤C”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/1786613187/O1CN01EGHZhi1ZPgpYYQ9kl_!!0-item_pic.jpg”,
“promotion_price”: “69.90”,
“price”: “69.90”,
“sales”: “4876”,
“num_iid”: “587489694459”,
“sample_id”: “”,
“seller_nick”: “南极人欧驰专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=587489694459&skuId=4611686605917082363&areaId=360500&user_id=1786613187&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1786613187”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “南极人男士短袖t恤男新款T全棉秋衣潮流潮牌体恤纯棉男装衣服KL”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/738722023/O1CN01F2rN1D1QoZoYPcnra_!!0-item_pic.jpg”,
“promotion_price”: “79.90”,
“price”: “79.90”,
“sales”: “3938”,
“num_iid”: “592917885351”,
“sample_id”: “”,
“seller_nick”: “南极人官方旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=592917885351&skuId=4611686611345273255&areaId=360500&user_id=738722023&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “738722023”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “南极人短袖t恤男潮流宽松半截袖体恤纯棉潮牌星空印花男装上衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/2201488921/O1CN01RPIS6w2FlrngYieJf_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “3435”,
“num_iid”: “586165511323”,
“sample_id”: “”,
“seller_nick”: “南极人恩盛专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=586165511323&skuId=4611686604592899227&areaId=360500&user_id=2201488921&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2201488921”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子旗舰男士短袖t恤男装潮牌宽松2019新款潮流纯棉长袖衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2168800166/O1CN01CRSyW61D64GGbvefd_!!2168800166.jpg”,
“promotion_price”: “134.00”,
“price”: “134.00”,
“sales”: “443”,
“num_iid”: “587871421954”,
“sample_id”: “”,
“seller_nick”: “花花公子阔步阁专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=587871421954&skuId=4611686606298809858&areaId=360500&user_id=2168800166&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2168800166”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “马克华菲短袖t恤男士2019夏季新款纯棉潮牌圆领白色潮流衣服男装”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/369351818/O1CN01XjnaPT1PIgcanEqS5_!!0-item_pic.jpg”,
“promotion_price”: “128.00”,
“price”: “128.00”,
“sales”: “627”,
“num_iid”: “565863864956”,
“sample_id”: “”,
“seller_nick”: “马克华菲胜达专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=565863864956&skuId=4223015093734&areaId=360500&user_id=369351818&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “369351818”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “纯棉短袖男士t恤2019新款上衣服圆领纯色宽松潮流全棉打底衫半袖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1984967918/O1CN01bbfB7g28MUaLjAfSn_!!1984967918.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “1063”,
“num_iid”: “586967160760”,
“sample_id”: “”,
“seller_nick”: “三度创作服饰旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=586967160760&skuId=4611686605394548664&areaId=360500&user_id=1984967918&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1984967918”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士长袖T恤潮流男装打底衫纯棉纯色秋冬上衣服内搭体桖潮流短袖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2266054310/O1CN010ZKtuZ1hi1Xdxg7IV_!!2266054310.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “1367”,
“num_iid”: “587473531709”,
“sample_id”: “”,
“seller_nick”: “晴依然旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=587473531709&skuId=4611686605900919613&areaId=360500&user_id=2266054310&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2266054310”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】2019新款潮牌夏季男士短袖白色T恤纯棉体恤半袖潮流装上衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/3086814024/O1CN011ZQggj1fb2HdRncZi_!!3086814024.jpg”,
“promotion_price”: “89.00”,
“price”: “89.00”,
“sales”: “2017”,
“num_iid”: “590377542832”,
“sample_id”: “”,
“seller_nick”: “哈迪赛旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=590377542832&skuId=4611686608804930736&areaId=360500&user_id=3086814024&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “3086814024”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】莫代尔短袖T恤男装夏纯棉黑白打底衫长袖秋装上衣服半袖潮流”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/757950456/O1CN01iHz4Zp1FEt7Se1a08_!!757950456.jpg”,
“promotion_price”: “65.00”,
“price”: “65.00”,
“sales”: “1614”,
“num_iid”: “566680172774”,
“sample_id”: “”,
“seller_nick”: “衣品优优旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=566680172774&skuId=4611686585107560678&areaId=360500&user_id=757950456&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “757950456”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “4件】男士长袖T恤秋衣内搭打底衫潮流纯棉秋冬季衣服体桖男装短袖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1820225821/O1CN01S2XRA01ss41szlsOX_!!1820225821.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “1847”,
“num_iid”: “581232508162”,
“sample_id”: “”,
“seller_nick”: “hkrut旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=581232508162&skuId=4611686599659896066&areaId=360500&user_id=1820225821&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1820225821”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2019新款男士短袖t恤纯棉上衣服打底衫圆领纯色宽松潮流黑色半袖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1984967918/O1CN01JfQYPH28MUaSQizEc_!!1984967918.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “329”,
“num_iid”: “587318742141”,
“sample_id”: “”,
“seller_nick”: “三度创作服饰旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=587318742141&skuId=4611686605746130045&areaId=360500&user_id=1984967918&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1984967918”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “衣品天成春秋冬新款男士长袖t恤纯色纯棉打底小衫韩版潮流上衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/360260087/O1CN01O71URX1CVt22qVYNN-360260087.jpg”,
“promotion_price”: “79.90”,
“price”: “79.90”,
“sales”: “3750”,
“num_iid”: “544116301715”,
“sample_id”: “”,
“seller_nick”: “衣品天成旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=544116301715&skuId=4024972790581&areaId=360500&user_id=360260087&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “360260087”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】夏季男士短袖白色T恤纯棉体恤纯色韩版半袖潮流打底衫上衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/3086814024/O1CN01dTjWlv1fb2HITkyes_!!3086814024.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “459”,
“num_iid”: “590128573903”,
“sample_id”: “”,
“seller_nick”: “哈迪赛旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=590128573903&skuId=4611686608555961807&areaId=360500&user_id=3086814024&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “3086814024”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖t恤夏季2019新款宽松潮流半袖男生夏装潮牌纯棉体桖衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/2951858604/O1CN01UIZSGo2DQgHUsn302_!!0-item_pic.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “616”,
“num_iid”: “591241750333”,
“sample_id”: “”,
“seller_nick”: “莫邦旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=591241750333&skuId=4611686609669138237&areaId=360500&user_id=2951858604&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2951858604”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “蓝色运动套装男韩版潮流2019秋季新款休闲外套男孩秋天衣服两件套”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1809760185/O1CN01tVLxf61DElpLvqm9b_!!1809760185.jpg”,
“promotion_price”: “165.00”,
“price”: “165.00”,
“sales”: “176”,
“num_iid”: “602206785231”,
“sample_id”: “”,
“seller_nick”: “益丹家族旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=602206785231&skuId=4399917450194&areaId=360500&user_id=1809760185&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1809760185”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “短袖t恤男潮牌潮流男装2019新款夏季男士半袖衣服纯棉青年体恤衫”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/748042622/TB2pe2Bw7UmBKNjSZFOXXab2XXa_!!748042622.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “796”,
“num_iid”: “577186166916”,
“sample_id”: “”,
“seller_nick”: “洛巴伦旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=577186166916&skuId=3808139129856&areaId=360500&user_id=748042622&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “748042622”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖t恤2019新款冰丝纯棉韩版潮流潮牌半袖男装夏装体桖衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1974644144/O1CN01cQToT41gTzoO2Sl4Y_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “349”,
“num_iid”: “591347689760”,
“sample_id”: “”,
“seller_nick”: “休斯王子男装旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=591347689760&skuId=4611686609775077664&areaId=360500&user_id=1974644144&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1974644144”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】秋季男士长袖t恤2019新款潮牌潮流宽松纯棉半袖体恤衣服男丅”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/2274194389/TB1Bz6Wh_JYBeNjy1zeXXahzVXa_!!0-item_pic.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “164”,
“num_iid”: “566883397048”,
“sample_id”: “”,
“seller_nick”: “米恩旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=566883397048&skuId=4611686585310784952&areaId=360500&user_id=2274194389&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2274194389”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2019新款男士短袖t恤纯棉半袖衣服潮流潮牌男装宽松体桖秋季长袖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2266054310/O1CN015nCTsE1hi1Z0Vp6GB_!!2266054310.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “610”,
“num_iid”: “564491445765”,
“sample_id”: “”,
“seller_nick”: “晴依然旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=564491445765&skuId=4611686582918833669&areaId=360500&user_id=2266054310&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2266054310”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】男士短袖t恤2019新款潮牌潮流夏宽松纯棉半袖体恤衣服男装C”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1786613187/O1CN01Es5sHU1ZPgpguSg9y_!!1786613187-0-pixelsss.jpg”,
“promotion_price”: “69.90”,
“price”: “69.90”,
“sales”: “874”,
“num_iid”: “587134288303”,
“sample_id”: “”,
“seller_nick”: “南极人欧驰专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=587134288303&skuId=4247810480618&areaId=360500&user_id=1786613187&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1786613187”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “南极人3件夏季男士短袖纯白色T恤纯棉体恤韩版半袖潮流打底衫衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/3639258815/O1CN01REjKJz2EzJqnb5jfM_!!3639258815.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “538”,
“num_iid”: “586615874203”,
“sample_id”: “”,
“seller_nick”: “南极人百利达专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=586615874203&skuId=4611686605043262107&areaId=360500&user_id=3639258815&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “3639258815”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “t恤男短袖宽松纯棉大码男装潮流衣服男士夏季海边度假沙滩套装潮”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/1748762532/O1CN01fhmPPC1UZhPdE54xm_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “502”,
“num_iid”: “585978074557”,
“sample_id”: “”,
“seller_nick”: “南极人布克专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=585978074557&skuId=4611686604405462461&areaId=360500&user_id=1748762532&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1748762532”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】莫代尔短袖T恤男装夏纯棉黑白打底衫长袖秋装上衣服半袖潮流”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/757950456/O1CN01JdBtpa1FEtB6LBFLc_!!0-item_pic.jpg”,
“promotion_price”: “65.00”,
“price”: “65.00”,
“sales”: “416”,
“num_iid”: “572431228952”,
“sample_id”: “”,
“seller_nick”: “衣品优优旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=572431228952&skuId=4611686590858616856&areaId=360500&user_id=757950456&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “757950456”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】男士短袖t恤V领白色纯棉半袖体恤衫潮流长袖衣服丅恤男潮牌”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/757950456/O1CN01Ff2dx11FEt5AZlyuz_!!757950456.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “351”,
“num_iid”: “582276419676”,
“sample_id”: “”,
“seller_nick”: “衣品优优旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=582276419676&skuId=4611686600703807580&areaId=360500&user_id=757950456&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “757950456”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖t恤2019潮流宽松半袖纯棉男生体桖男装潮牌体恤衫上衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2032033486/TB2Kq_owStYBeNjSspkXXbU8VXa_!!2032033486-0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “508”,
“num_iid”: “571168056379”,
“sample_id”: “”,
“seller_nick”: “领拓旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=571168056379&skuId=4611686589595444283&areaId=360500&user_id=2032033486&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2032033486”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件#夏装冰丝纯棉短袖t恤 男衬衫领半袖潮流上衣服体恤修身polo衫”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/2243137591/O1CN01iP4sxi25wj2dV7hN9_!!0-item_pic.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “488”,
“num_iid”: “589178658040”,
“sample_id”: “”,
“seller_nick”: “mucapodu旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=589178658040&skuId=4611686607606045944&areaId=360500&user_id=2243137591&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2243137591”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “5件】男士短袖t恤纯棉印花潮流体桖潮牌半袖宽松上秋衣服男装长袖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2226782914/TB2Kvb_e_CWBKNjSZFtXXaC3FXa_!!2226782914.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “272”,
“num_iid”: “568946985799”,
“sample_id”: “”,
“seller_nick”: “文将服饰旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=568946985799&skuId=4611686587374373703&areaId=360500&user_id=2226782914&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2226782914”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “马克华菲短袖t恤男2019夏男士圆领纯棉白色衣服潮流宽松体恤男装”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/369351818/O1CN01v1fmzU1PIgceAN8f2_!!0-item_pic.jpg”,
“promotion_price”: “98.00”,
“price”: “98.00”,
“sales”: “457”,
“num_iid”: “558482794486”,
“sample_id”: “”,
“seller_nick”: “马克华菲胜达专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=558482794486&skuId=4154743663024&areaId=360500&user_id=369351818&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “369351818”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】莫代尔短袖T恤男装夏纯棉黑白打底衫长袖秋装上衣服半袖潮流”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/757950456/O1CN01nurNxC1FEtB9uM0a2_!!0-item_pic.jpg”,
“promotion_price”: “65.00”,
“price”: “65.00”,
“sales”: “382”,
“num_iid”: “575193163102”,
“sample_id”: “”,
“seller_nick”: “衣品优优旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=575193163102&skuId=4611686593620551006&areaId=360500&user_id=757950456&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “757950456”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子t恤男短袖体恤男士纯棉V领修身打底半袖衣服夏装潮流男装”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2090797951/TB23cjFepmWBuNjSspdXXbugXXa_!!2090797951.jpg”,
“promotion_price”: “139.00”,
“price”: “139.00”,
“sales”: “23”,
“num_iid”: “565316537746”,
“sample_id”: “”,
“seller_nick”: “花花公子锦睿专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=565316537746&skuId=3580259941368&areaId=360500&user_id=2090797951&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2090797951”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2019新款夏季男士t恤潮牌潮流半截袖日系休闲宽松纯棉短袖衣服男”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/748042622/O1CN01hnkOzd1VEv0Pgx0Xy_!!748042622.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “181”,
“num_iid”: “592158256073”,
“sample_id”: “”,
“seller_nick”: “洛巴伦旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=592158256073&skuId=4078616548835&areaId=360500&user_id=748042622&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “748042622”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “马克华菲短袖t恤男士2019夏季新款纯棉体恤宽松潮流半袖衣服男装”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/369351818/O1CN01i3ipNP1PIgcdcnlZU_!!0-item_pic.jpg”,
“promotion_price”: “138.00”,
“price”: “138.00”,
“sales”: “326”,
“num_iid”: “557945058859”,
“sample_id”: “”,
“seller_nick”: “马克华菲胜达专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=557945058859&skuId=3983415280664&areaId=360500&user_id=369351818&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “369351818”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “t恤男短袖潮牌夏季2019新款潮流丅夏装半袖男装衣服男生纯棉体桖”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/1794396586/O1CN01wdJo3c1yWR3sdlkf6_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “454”,
“num_iid”: “567282453977”,
“sample_id”: “”,
“seller_nick”: “古圣哲旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=567282453977&skuId=3778581294948&areaId=360500&user_id=1794396586&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1794396586”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖t恤2019新款男装潮流上衣服夏装纯棉半袖潮牌夏季体恤潮”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1070927401/O1CN01c6Io4b24XhqrEC1c9_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “179”,
“num_iid”: “566471357295”,
“sample_id”: “”,
“seller_nick”: “布尔根兰旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=566471357295&skuId=4611686584898745199&areaId=360500&user_id=1070927401&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1070927401”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “3件]2019新款夏季男士短袖t恤纯棉男装体恤潮牌潮流半袖宽松衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/2951858604/O1CN01kv4vpD2DQgGrLqlNM_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “61”,
“num_iid”: “590236981474”,
“sample_id”: “”,
“seller_nick”: “莫邦旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=590236981474&skuId=4611686608664369378&areaId=360500&user_id=2951858604&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2951858604”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2019新款纯棉短袖t恤 男衬衫领潮流翻领上衣服夏季修身半袖polo衫”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/2243137591/O1CN014CBTll25wj4AtAGYB_!!0-item_pic.jpg”,
“promotion_price”: “89.00”,
“price”: “89.00”,
“sales”: “504”,
“num_iid”: “595234490132”,
“sample_id”: “”,
“seller_nick”: “mucapodu旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=595234490132&skuId=4611686613661878036&areaId=360500&user_id=2243137591&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2243137591”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子衣服夏季男士V领宽松纯棉t恤圆领短袖半袖潮流潮牌体桖丅”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/261347993/O1CN01YwaQS328uqKCHUWWL_!!261347993-0-pixelsss.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “78”,
“num_iid”: “38807514372”,
“sample_id”: “”,
“seller_nick”: “露莱丝服饰专营店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=38807514372&skuId=3486956905444&areaId=360500&user_id=261347993&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “261347993”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “夏季t恤男潮牌潮流男装2019新款纯棉半袖上衣青年衣服男短袖体恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/748042622/O1CN018mu4LG1VEv03tYpzR_!!748042622.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “676”,
“num_iid”: “591776251498”,
“sample_id”: “”,
“seller_nick”: “洛巴伦旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=591776251498&skuId=4234758631568&areaId=360500&user_id=748042622&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “748042622”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “马克华菲男士短袖t恤 2019新款潮流上衣情侣夏装纯棉衣服打底衫男”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/94399436/O1CN01kAKUlt2JZjqlKl1Zx_!!0-item_pic.jpg”,
“promotion_price”: “148.00”,
“price”: “148.00”,
“sales”: “1889”,
“num_iid”: “586238092730”,
“sample_id”: “”,
“seller_nick”: “马克华菲官方旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=586238092730&skuId=4151379614672&areaId=360500&user_id=94399436&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “94399436”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “t恤男短袖夏季2019新款纯棉宽松休闲潮牌潮流半袖体恤上衣服套装”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/3055237276/O1CN01v7n4ZA23cSLUBKYOy_!!0-item_pic.jpg”,
“promotion_price”: “78.00”,
“price”: “78.00”,
“sales”: “485”,
“num_iid”: “590283182792”,
“sample_id”: “”,
“seller_nick”: “vuug旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=590283182792&skuId=4611686608710570696&areaId=360500&user_id=3055237276&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “3055237276”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “t恤男士短袖潮流纯棉2019新款韩版宽松半袖体恤衣服男生潮牌男装”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2380441317/O1CN01DwVhRk1LbE7sLy9KH_!!2380441317.jpg”,
“promotion_price”: “69.90”,
“price”: “69.90”,
“sales”: “390”,
“num_iid”: “563646565988”,
“sample_id”: “”,
“seller_nick”: “迈特优服饰旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=563646565988&skuId=4611686582073953892&areaId=360500&user_id=2380441317&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2380441317”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖t恤2019新款宽松潮流上衣服夏装纯棉半袖潮牌夏季体恤潮”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/3055237276/O1CN01yD0Wr923cSJ4D3rbt_!!3055237276.jpg”,
“promotion_price”: “68.00”,
“price”: “68.00”,
“sales”: “254”,
“num_iid”: “566846067898”,
“sample_id”: “”,
“seller_nick”: “vuug旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=566846067898&skuId=4611686585273455802&areaId=360500&user_id=3055237276&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “3055237276”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子t恤男短袖夏季韩版潮流港风ins圆领半袖衣服纯棉宽松体恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2057500938/O1CN01nMcXbu1Ine4IDgwQY_!!2057500938.jpg”,
“promotion_price”: “139.00”,
“price”: “139.00”,
“sales”: “112”,
“num_iid”: “589605393818”,
“sample_id”: “”,
“seller_nick”: “花花公子捷德专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=589605393818&skuId=4201490054040&areaId=360500&user_id=2057500938&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2057500938”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “唐狮短袖t恤男装2019新款潮流纯棉上衣半袖圆领韩版学生港风衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/188124207/O1CN01byBZZh1gwqlCVqTx5_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “2021”,
“num_iid”: “545259720825”,
“sample_id”: “”,
“seller_nick”: “唐狮官方旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=545259720825&skuId=3573371657487&areaId=360500&user_id=188124207&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “188124207”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】莫代尔短袖T恤男装夏纯棉黑白打底衫长袖秋装上衣服半袖潮流”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/757950456/O1CN012SRxjC1FEtB0hmzCe_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “313”,
“num_iid”: “566882806182”,
“sample_id”: “”,
“seller_nick”: “衣品优优旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=566882806182&skuId=4611686585310194086&areaId=360500&user_id=757950456&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “757950456”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖t恤夏季有领纯棉丅恤潮流t桖立领潮牌上衣服半袖针织小衫”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/874506242/O1CN01JfMQsX1vyskExqepy_!!874506242.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “26”,
“num_iid”: “565940683668”,
“sample_id”: “”,
“seller_nick”: “heropeck旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=565940683668&skuId=4611686584368071572&areaId=360500&user_id=874506242&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “874506242”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “唐狮短袖t恤男潮流2019夏季新款纯棉圆领衣服学生宽松港风半袖T恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/188124207/O1CN01w9D1kx1gwqlXMDfOU_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “1719”,
“num_iid”: “567158172667”,
“sample_id”: “”,
“seller_nick”: “唐狮官方旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=567158172667&skuId=4025413189601&areaId=360500&user_id=188124207&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “188124207”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子短袖t恤男圆领纯棉夏装男士韩版宽松半袖上衣潮流衣服丅”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2090797951/O1CN01YQP0C228bbdRqIsrq_!!0-item_pic.jpg”,
“promotion_price”: “139.00”,
“price”: “139.00”,
“sales”: “20”,
“num_iid”: “589420104607”,
“sample_id”: “”,
“seller_nick”: “花花公子锦睿专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=589420104607&skuId=4032495264576&areaId=360500&user_id=2090797951&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2090797951”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】男士短袖t恤V领白色纯棉半袖潮流体恤衫衣服男长袖潮牌丅恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/757950456/O1CN012kYLze1FEt8u8vEMU_!!757950456.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “256”,
“num_iid”: “593703384888”,
“sample_id”: “”,
“seller_nick”: “衣品优优旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=593703384888&skuId=4611686612130772792&areaId=360500&user_id=757950456&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “757950456”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子男士短袖T恤立领修身男装韩版潮流短袖T恤男纯棉夏季衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2010921703/O1CN01HbUuIP1OS14Pz4Prc_!!0-item_pic.jpg”,
“promotion_price”: “139.00”,
“price”: “139.00”,
“sales”: “18”,
“num_iid”: “557633077278”,
“sample_id”: “”,
“seller_nick”: “playboy自由前行专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=557633077278&skuId=4424309403218&areaId=360500&user_id=2010921703&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2010921703”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “纯棉 t恤男短袖潮流夏季韩版帅气衣服青年修身半袖POLO衫条纹体恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/3332187076/O1CN01EN1uFx228r2eUog93_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “184”,
“num_iid”: “583439074784”,
“sample_id”: “”,
“seller_nick”: “宾爵文旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=583439074784&skuId=4092868986836&areaId=360500&user_id=3332187076&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “3332187076”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2019大码短袖t恤男潮牌纯棉学生宽松韩版丅恤潮流男士衣服夏季”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/2129072944/O1CN01u4QBAa1XcOYu0U2Le_!!2129072944.jpg”,
“promotion_price”: “79.00”,
“price”: “79.00”,
“sales”: “90”,
“num_iid”: “549639510689”,
“sample_id”: “”,
“seller_nick”: “西盟罗盾旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=549639510689&skuId=4611686568066898593&areaId=360500&user_id=2129072944&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2129072944”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “2件】纯棉男士长袖T恤潮流2019新款秋冬装白色打底衫上衣服男秋衣”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/1574522582/O1CN01rihT1d1UwbDMqZwrE_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “523”,
“num_iid”: “578476877900”,
“sample_id”: “”,
“seller_nick”: “尚西哲服饰旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=578476877900&skuId=3834578121019&areaId=360500&user_id=1574522582&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1574522582”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子旗舰短袖T恤男士夏季纯棉衣服修身潮流翻领休闲Polo衫男”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i2/1610222843/O1CN01ROFLwY1Ws8aRqcY6d_!!0-item_pic.jpg”,
“promotion_price”: “129.00”,
“price”: “129.00”,
“sales”: “222”,
“num_iid”: “547890533217”,
“sample_id”: “”,
“seller_nick”: “playboy男装旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=547890533217&skuId=4217191891233&areaId=360500&user_id=1610222843&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1610222843”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “夏季男圆领短袖t恤纯棉白色修身半袖潮流全棉大码丝光简约上衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/554185355/O1CN01g1u9aj1pQdTyqieFZ_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “187”,
“num_iid”: “567158858101”,
“sample_id”: “”,
“seller_nick”: “joestar旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=567158858101&skuId=4611686585586246005&areaId=360500&user_id=554185355&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “554185355”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “唐狮短袖t恤男潮流夏季新款韩版纯棉圆领青少年白色宽松衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i3/188124207/TB13AQDinXYBeNkHFrdXXciuVXa_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “1532”,
“num_iid”: “567852378998”,
“sample_id”: “”,
“seller_nick”: “唐狮官方旗舰店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=567852378998&skuId=3788703491579&areaId=360500&user_id=188124207&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “188124207”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “男士短袖T恤潮流潮牌纯棉半截袖上衣服2019夏季新款男装大码体恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/912266212/O1CN01d9AqXN1vl8tA4p4BT_!!0-item_pic.jpg”,
“promotion_price”: “69.00”,
“price”: “69.00”,
“sales”: “24”,
“num_iid”: “593422343883”,
“sample_id”: “”,
“seller_nick”: “南极人罗风专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=593422343883&skuId=4611686611849731787&areaId=360500&user_id=912266212&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “912266212”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “马克华菲半袖男装2019夏新款修身衣服潮流纯棉纯色白色短袖T恤男”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1023428922/O1CN01GtXPSH2FmKGyaZEnr_!!1023428922.jpg”,
“promotion_price”: “98.00”,
“price”: “98.00”,
“sales”: “69”,
“num_iid”: “563467340652”,
“sample_id”: “”,
“seller_nick”: “马克华菲联合创景专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=563467340652&skuId=3855644524950&areaId=360500&user_id=1023428922&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1023428922”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “马克华菲t恤男2019新款夏季潮流港风衣服白色圆领纯棉男士短袖t恤”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i4/2986633485/O1CN01VAsjJu1bcArcOnKAc_!!2986633485.jpg”,
“promotion_price”: “138.00”,
“price”: “138.00”,
“sales”: “136”,
“num_iid”: “568753211842”,
“sample_id”: “”,
“seller_nick”: “马克华菲康百专卖店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=568753211842&skuId=4172633463435&areaId=360500&user_id=2986633485&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “2986633485”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
},
{
“title”: “花花公子男士短袖t恤夏装潮牌潮流宽松圆领纯棉百搭男生丅恤衣服”,
“pic_url”: “//img.alicdn.com/bao/uploaded/i1/1112825728/O1CN01VQrLqt1sBTBVNmrRx_!!1112825728.jpg”,
“promotion_price”: “139.00”,
“price”: “139.00”,
“sales”: “18”,
“num_iid”: “592321680599”,
“sample_id”: “”,
“seller_nick”: “联创服饰专营店”,
“post_fee”: “”,
“area”: null,
“detail_url”: “//detail.tmall.com/item.htm?id=592321680599&skuId=4081522872012&areaId=360500&user_id=1112825728&cat_id=2&is_b=1&rn=f0073178881b3c291cca92c5fbc38b9c”,
“seller_info”: {
“level”: 99,
“shop_type”: “B”,
“user_num_id”: “1112825728”,
“cid”: 0,
“delivery_score”: “”,
“item_score”: “”,
“score_p”: “”
}
}
],
“url”: “http://s.taobao.com/list?spm=a230r.1.0.0.EK0LE0&type=similar&app=i2i&mid=&rec_type=&uniqpid=&nid=527655087864”,
“pagecount”: 0,
“page_size”: 40,
“real_total_results”: “”,
“page”: “1”,
“data_from”: “item_search”
},
“error”: “”,
“translate_status”: “”,
“translate_time”: 0,
“language”: {
“default_lang”: “cn”,
“current_lang”: “zh-CN”
},
“cache”: 0,
“api_info”: “today:8 max:15000”,
“execution_time”: 0.209,
“server_time”: “Beijing/2019-12-02 09:21:45”,
“call_args”: {
“q”: “短袖 纯棉 男装 T恤 男士 潮流 衣服”
},
“api_type”: “taobao”,
“translate_language”: “zh-CN”,
“translate_engine”: “google_cn”,
“server_memory”: “7.63MB”,
“request_id”: “.15659226.5de467298f0b40.78189866”
}

淘宝API 电商API 所有电商API 拼多多API 京东API 1688API API接口

from flask import Flask, render_template, request, jsonify from flask_sqlalchemy import SQLAlchemy from datetime import datetime import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import linear_kernel import numpy as np import random app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///ecommerce.db' app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db = SQLAlchemy(app) # 模型定义 class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(80), unique=True, nullable=False) email = db.Column(db.String(120), unique=True, nullable=False) class Product(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(200), nullable=False) description = db.Column(db.Text) price = db.Column(db.Float, nullable=False) category = db.Column(db.String(100)) brand = db.Column(db.String(100)) image_url = db.Column(db.String(200)) rating = db.Column(db.Float) reviews_count = db.Column(db.Integer) def to_dict(self): return { 'id': self.id, 'name': self.name, 'price': self.price, 'image_url': self.image_url, 'category': self.category, 'brand': self.brand } class UserBehavior(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) product_id = db.Column(db.Integer, db.ForeignKey('product.id'), nullable=False) action = db.Column(db.String(20), nullable=False) # 'view', 'search', 'buy', 'add_to_cart' timestamp = db.Column(db.DateTime, default=datetime.utcnow) class SearchHistory(db.Model): id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False) query = db.Column(db.String(200), nullable=False) timestamp = db.Column(db.DateTime, default=datetime.utcnow) # 搜索建议API - 基于协同过滤 @app.route('/api/suggestions', methods=['GET']) def get_suggestions(): query = request.args.get('query', '').strip().lower() user_id = request.args.get('user_id', 1, type=int) # 实际项目中应从会话获取 if len(query) < 2: return jsonify([]) # 1. 基于内容的搜索建议 content_based_suggestions = get_content_based_suggestions(query) # 2. 基于协同过滤的搜索建议 collaborative_suggestions = get_collaborative_filtering_suggestions(user_id, query) # 3. 基于用户历史的搜索建议 # history_suggestions = get_history_based_suggestions(user_id, query) # 合并结果并去重 suggestions = [] suggestion_set = set() # 优先添加协同过滤建议 for suggestion in collaborative_suggestions: if suggestion['value'].lower() not in suggestion_set: suggestion_set.add(suggestion['value'].lower()) suggestions.append(suggestion) # 添加内容建议 for suggestion in content_based_suggestions: if suggestion['value'].lower() not in suggestion_set: suggestion_set.add(suggestion['value'].lower()) suggestions.append(suggestion) # # 添加历史建议 # for suggestion in history_suggestions: # if suggestion['value'].lower() not in suggestion_set: # suggestion_set.add(suggestion['value'].lower()) # suggestions.append(suggestion) return jsonify(suggestions[:5]) # 基于内容的搜索建议 def get_content_based_suggestions(query): products = Product.query.filter( (Product.name.ilike(f'%{query}%')) | (Product.description.ilike(f'%{query}%')) ).limit(5).all() return [ { 'type': 'product', 'value': product.name, 'data': product.to_dict() } for product in products ] # 基于协同过滤的搜索建议 def get_collaborative_filtering_suggestions(user_id, query): # 获取用户最近的行为 recent_behaviors = UserBehavior.query.filter( UserBehavior.user_id == user_id ).order_by(UserBehavior.timestamp.desc()).limit(10).all() if not recent_behaviors: return [] # 获取相似用户喜欢的商品 similar_user_products = get_similar_users_products(user_id) # 从相似用户喜欢的商品中筛选与查询相关的 relevant_products = [] for product in similar_user_products: if query.lower() in product.name.lower() or query.lower() in (product.description or '').lower(): relevant_products.append(product) return [ { 'type': 'collaborative', 'value': product.name, 'data': product.to_dict() } for product in relevant_products[:3] ] # 获取相似用户喜欢的商品 def get_similar_users_products(user_id): # 这里实现协同过滤算法 # 获取所有用户行为数据 behaviors = UserBehavior.query.all() # 构建用户-商品交互矩阵 user_item_matrix = {} for behavior in behaviors: if behavior.user_id not in user_item_matrix: user_item_matrix[behavior.user_id] = {} # 不同行为赋予不同权重 if behavior.action == 'buy': weight = 3 elif behavior.action == 'add_to_cart': weight = 2 elif behavior.action == 'view': weight = 1 else: # search weight = 1.5 user_item_matrix[behavior.user_id][behavior.product_id] = weight # 如果没有足够的数据,返回热门商品 if len(user_item_matrix) < 2 or user_id not in user_item_matrix: return Product.query.order_by(Product.reviews_count.desc()).limit(5).all() # 计算当前用户与其他用户的相似度 target_user = user_item_matrix[user_id] similarities = [] for other_user_id, items in user_item_matrix.items(): if other_user_id == user_id: continue # 计算余弦相似度 dot_product = 0 target_norm = 0 other_norm = 0 for item_id, weight in items.items(): if item_id in target_user: dot_product += target_user[item_id] * weight other_norm += weight ** 2 for item_id, weight in target_user.items(): target_norm += weight ** 2 if target_norm == 0 or other_norm == 0: similarity = 0 else: similarity = dot_product / (np.sqrt(target_norm) * np.sqrt(other_norm)) similarities.append((other_user_id, similarity)) # 按相似度排序 similarities.sort(key=lambda x: x[1], reverse=True) # 获取最相似的前3个用户 top_similar_users = similarities[:3] # 从相似用户喜欢的商品中推荐 recommended_products = set() for similar_user_id, _ in top_similar_users: for product_id in user_item_matrix[similar_user_id]: if product_id not in target_user: product = Product.query.get(product_id) if product: recommended_products.add(product) return list(recommended_products) # 基于用户历史的搜索建议 def get_history_based_suggestions(user_id, query): history_suggestions = SearchHistory.query.filter( SearchHistory.user_id == user_id, SearchHistory.query.ilike(f'%{query}%') ).order_by(SearchHistory.timestamp.desc()).limit(3).all() return [ { 'type': 'history', 'value': history.query, 'data': {'query': history.query} } for history in history_suggestions ] # 搜索功能 @app.route('/search', methods=['GET']) def search(): query = request.args.get('query', '') category = request.args.get('category') brand = request.args.get('brand') min_price = request.args.get('min_price', type=float) max_price = request.args.get('max_price', type=float) # 记录搜索历史 user_id = 1 # 假设已登录用户 if query: search_history = SearchHistory(user_id=user_id, query=query) db.session.add(search_history) # 记录用户搜索行为 products = Product.query.filter( (Product.name.ilike(f'%{query}%')) | (Product.description.ilike(f'%{query}%')) ).limit(3).all() for product in products: behavior = UserBehavior( user_id=user_id, product_id=product.id, action='search' ) db.session.add(behavior) db.session.commit() # 执行搜索 products = search_products(query, category, brand, min_price, max_price) return render_template('search_results.html', products=products, query=query) # 搜索商品的辅助函数 def search_products(query, category=None, brand=None, min_price=None, max_price=None): query = query.strip() base_query = Product.query if query: base_query = base_query.filter( (Product.name.ilike(f'%{query}%')) | (Product.description.ilike(f'%{query}%')) ) if category: base_query = base_query.filter(Product.category == category) if brand: base_query = base_query.filter(Product.brand == brand) if min_price is not None: base_query = base_query.filter(Product.price >= min_price) if max_price is not None: base_query = base_query.filter(Product.price <= max_price) # 按相关性和销量排序 return base_query.order_by(Product.reviews_count.desc()).all() # 首页 @app.route('/') def index(): # 获取热门商品 trending_products = Product.query.order_by(Product.reviews_count.desc()).limit(8).all() # 获取推荐商品 user_id = 1 # 假设已登录用户 user_recs = get_user_recommendations(user_id) return render_template('base.html', trending=trending_products, user_recs=user_recs) # 获取用户推荐 def get_user_recommendations(user_id): # 使用协同过滤获取推荐商品 recommended_products = get_similar_users_products(user_id) # 如果推荐不足,补充热门商品 if len(recommended_products) < 4: hot_products = Product.query.order_by(Product.reviews_count.desc()).all() for product in hot_products: if product not in recommended_products: recommended_products.append(product) if len(recommended_products) >= 4: break return recommended_products[:4] # 初始化示例数据 def init_sample_data(): if Product.query.count() == 0: # 添加示例产品 sample_products = [ { 'name': '苹果 iPhone 14 Pro 256GB', 'description': '6.1英寸超视网膜XDR显示屏,A16仿生芯片,4800万像素主摄', 'price': 7999.0, 'category': '手机', 'brand': '苹果', 'image_url': 'https://picsum.photos/seed/iphone14/400/400', 'rating': 4.8, 'reviews_count': 1204 }, { 'name': '华为 Mate 50 Pro 256GB', 'description': '6.74英寸OLED屏幕,骁龙8+ 4G芯片,超光变摄像头苹果', 'price': 6799.0, 'category': '手机', 'brand': '华为', 'image_url': 'https://picsum.photos/seed/mate50/400/400', 'rating': 4.7, 'reviews_count': 987 }, { 'name': '小米 13 Pro 256GB', 'description': '6.73英寸2K屏幕,骁龙8 Gen2芯片,徕卡三摄', 'price': 5999.0, 'category': '手机', 'brand': '小米', 'image_url': 'https://picsum.photos/seed/xiaomi13/400/400', 'rating': 4.6, 'reviews_count': 856 }, { 'name': '三星 Galaxy S23 Ultra 256GB', 'description': '6.8英寸2K AMOLED屏幕,骁龙8 Gen2芯片,2亿像素主摄', 'price': 8999.0, 'category': '手机', 'brand': '三星', 'image_url': 'https://picsum.photos/seed/s23ultra/400/400', 'rating': 4.7, 'reviews_count': 732 }, { 'name': 'Apple Watch Series 8', 'description': '45毫米铝金属表壳,全天候视网膜显示屏,血氧检测', 'price': 3199.0, 'category': '智能手表', 'brand': '苹果', 'image_url': 'https://picsum.photos/seed/aw8/400/400', 'rating': 4.6, 'reviews_count': 1120 }, { 'name': '华为 Watch GT 3 Pro', 'description': '46毫米钛金属表壳,圆形屏幕,精准心率监测', 'price': 2499.0, 'category': '智能手表', 'brand': '华为', 'image_url': 'https://picsum.photos/seed/gt3pro/400/400', 'rating': 4.5, 'reviews_count': 980 }, { 'name': '小米 Watch S1 Pro', 'description': '1.43英寸AMOLED屏幕,117种运动模式,50米防水', 'price': 1299.0, 'category': '智能手表', 'brand': '小米', 'image_url': 'https://picsum.photos/seed/miw1/400/400', 'rating': 4.4, 'reviews_count': 760 }, { 'name': 'AirPods Pro 2', 'description': '主动降噪,通透模式,自适应均衡,IP54防水防尘', 'price': 1899.0, 'category': '耳机', 'brand': '苹果', 'image_url': 'https://picsum.photos/seed/airpods2/400/400', 'rating': 4.7, 'reviews_count': 1540 }, { 'name': '华为 FreeBuds Pro 2', 'description': '主动降噪,高解析度音频,双单元设计', 'price': 1199.0, 'category': '耳机', 'brand': '华为', 'image_url': 'https://picsum.photos/seed/hwbuds2/400/400', 'rating': 4.6, 'reviews_count': 1230 }, { 'name': '小米 Buds 4 Pro', 'description': '主动降噪,HiFi音质,通透模式,无线充电', 'price': 799.0, 'category': '耳机', 'brand': '小米', 'image_url': 'https://picsum.photos/seed/xmbuds4/400/400', 'rating': 4.5, 'reviews_count': 980 } ] for product_data in sample_products: product = Product(**product_data) db.session.add(product) db.session.commit() # 添加示例用户 user = User(username='test_user', email='test@example.com') db.session.add(user) db.session.commit() # 添加示例用户行为 user_id = user.id product_ids = [p.id for p in Product.query.all()] # 用户1的行为 for i, product_id in enumerate(product_ids[:5]): actions = ['view', 'search', 'add_to_cart', 'buy', 'view'] for action in actions: behavior = UserBehavior( user_id=user_id, product_id=product_id, action=action ) db.session.add(behavior) # 添加一些其他用户的行为,用于协同过滤 for other_user_id in range(2, 6): other_user = User(username=f'user{other_user_id}', email=f'user{other_user_id}@example.com') db.session.add(other_user) db.session.commit() # 每个用户随机喜欢一些商品 liked_products = random.sample(product_ids, random.randint(3, 6)) for product_id in liked_products: action = random.choice(['view', 'add_to_cart', 'buy']) behavior = UserBehavior( user_id=other_user_id, product_id=product_id, action=action ) db.session.add(behavior) db.session.commit() if __name__ == '__main__': with app.app_context(): db.create_all() # 初始化一些示例数据 init_sample_data() app.run(debug=True) 这是代码 需要改什么吗
最新发布
07-15
### 代码审查与优化建议 #### 1. SQLAlchemy 查询优化 在 Flask 应用中,SQLAlchemy 的使用应尽量避免在视图函数中直接执行复杂查询。可以将数据库逻辑封装到服务层或模型方法中,提高代码的可维护性和复用性。例如,以下查询: ```python product = Product.query.get(product_id) ``` 该方式虽然简洁,但未充分利用 SQLAlchemy ORM 提供的缓存和性能优化机制。建议改写为使用 `session.get()` 或 `session.execute()` 来提升查询效率,并结合 `joinedload` 或 `selectinload` 预加载关联数据以减少 N+1 查询问题[^1]。 示例优化: ```python from sqlalchemy.orm import joinedload product = db.session.get(Product, product_id, options=[joinedload(Product.reviews)]) ``` #### 2. 用户行为追踪设计改进 用户行为(如浏览记录、点击量)通常存储于数据库或缓存系统中。当前实现可能直接通过同步方式写入数据库,容易造成性能瓶颈。建议引入异步任务队列(如 Celery + Redis/RabbitMQ)来处理日志记录操作,减轻主应用压力。 例如,定义一个后台任务: ```python from celery import shared_task @shared_task def log_user_action(user_id, action_type, product_id): # 异步记录用户行为 action = UserAction(user_id=user_id, action=action_type, product_id=product_id) db.session.add(action) db.session.commit() ``` 在视图中调用: ```python log_user_action.delay(current_user.id, 'view', product_id) ``` #### 3. 推荐系统算法优化 推荐系统的实现若仅依赖简单的排序或热门商品展示,效果有限。可考虑引入协同过滤(Collaborative Filtering)或基于内容的推荐策略。例如,使用用户历史浏览数据构建偏好模型: ```python from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity def recommend_products(user_id, top_n=5): user_actions = UserAction.query.filter_by(user_id=user_id).all() viewed_product_ids = [a.product_id for a in user_actions] if not viewed_product_ids: return Product.query.order_by(Product.reviews_count.desc()).limit(top_n).all() products = Product.query.all() tfidf = TfidfVectorizer(stop_words='english') tfidf_matrix = tfidf.fit_transform([p.description for p in products]) cosine_sim = cosine_similarity(tfidf_matrix, tfidf_matrix) indices = pd.Series(range(len(products)), index=[p.id for p in products]).drop_duplicates() idx = indices[viewed_product_ids[0]] sim_scores = list(enumerate(cosine_sim[idx])) sim_scores = sorted(sim_scores, key=lambda x: x[1], reverse=True) product_indices = [i[0] for i in sim_scores[1:top_n+1]] return [products[i] for i in product_indices] ``` 此方法利用了商品描述的 TF-IDF 向量相似度进行推荐,提升了个性化程度。 --- ### 性能与安全建议 - **使用连接池**:配置 SQLAlchemy 使用连接池(如 `SQLALCHEMY_POOL_SIZE`),防止高并发下数据库连接耗尽。 - **启用缓存**:对频繁访问的数据(如首页推荐、热销商品)使用缓存(如 Redis),减少数据库查询次数。 - **限制请求频率**:对关键接口设置速率限制(如 Flask-Limiter),防止恶意刷接口- **使用 HTTPS**:部署时确保启用 HTTPS,保护用户数据传输安全。 --- ### 示例:结构化推荐接口 ```python @app.route('/recommendations') @login_required def get_recommendations(): recommended = recommend_products(current_user.id) return jsonify([{ 'id': p.id, 'name': p.name, 'price': p.price, 'description': p.description } for p in recommended]) ``` ---
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值