淘寶詳情api介面獲取的方式及簡單示例

Alin2477305449發表於2023-04-04


淘寶的反爬蟲機制十分嚴,而很多時候,沒辦法高效的拿到資料內容響應終端需求,而依賴爬蟲就會造成動不動就出現滑塊驗證,讓人很無解,正好,公司有這樣的需求,讓我負責解決這個問題,剛開始各種嘗試,始終沒有繞過淘寶的滑塊驗證碼,搞了好幾天,都沒有進展; 然後各種網上資料查詢,最終還是不負努力,找到更好的解決方案,讓淘寶不再出現任何滑塊驗證碼,完全繞過,實現更好的使用者體驗。下面就說說封裝好的

介面說明:

我已經把該方法封裝成介面,只需要把要得到的資料URL,傳給我就可以,然後及時的響應你的資料內容需求,可用於實現淘寶自動登入、秒殺、過淘寶二次驗證攔截等多種常見場景操作。


注意 此介面是透過演算法處理,並非模擬拖動驗證碼。PC、手機淘寶均可用。


返回結果:

{
	"item": {
		"num_iid": "652874751412",
		"title": "北歐輕奢布藝沙發 小戶型簡約現代客廳ins風網紅款三雙人訂製沙發",
		"desc_short": "",
		"price": 480,
		"total_price": "",
		"suggestive_price": "",
		"orginal_price": 480,
		"nick": "惜情yqq1127",
		"num": 200,
		"detail_url": "
		"pic_url": "!!2568161054.jpg",
		"brand": null,
		"brandId": "",
		"rootCatId": "",
		"cid": 50020632,
		"desc": "<div > \n   <div >\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n   </div> \n  </div><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-4.642bd6694a315&p=3060574562&k=91015&t=1680594538\" style=\"display:none\" />",
		"item_imgs": [
			{
				"url": "!!2568161054.jpg"
			},
			{
				"url": "!!2568161054.jpg"
			},
			{
				"url": "!!2568161054.jpg"
			},
			{
				"url": "!!2568161054.jpg"
			},
			{
				"url": "!!2568161054.jpg"
			}
		],
		"item_weight": "",
		"post_fee": "",
		"freight": "",
		"express_fee": "",
		"ems_fee": "",
		"shipping_to": "",
		"video": {
			"url": null
		},
		"sample_id": "",
		"props_name": "31480:14306495906:幾人坐:腳踏90*60*48cm;31480:14306495907:幾人坐:雙人165*95*67cm;31480:14306495908:幾人坐:三人210*95*67cm;31480:14306495909:幾人坐:單人100*95*67cm;31480:21480914361:幾人坐:四人位240*95*67cm;31480:21480914362:幾人坐:大四人320*95*76cm;31480:1387571900:幾人坐:3米貴妃沙發;31480:32527954:幾人坐:定製尺寸;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
		"prop_imgs": {
			"prop_img": [
				{
					"properties": "1627207:28321",
					"url": "!!2568161054.jpg"
				}
			]
		},
		"props_imgs": {
			"prop_img": [
				{
					"properties": "1627207:28321",
					"url": "!!2568161054.jpg"
				}
			]
		},
		"property_alias": "",
		"props": [
			{
				"name": "品牌",
				"value": "#0 工廠"
			},
			{
				"name": "型號",
				"value": "520"
			},
			{
				"name": "材質",
				"value": "木"
			},
			{
				"name": "木質材質",
				"value": "松木"
			},
			{
				"name": "面料",
				"value": "絨布"
			},
			{
				"name": "風格",
				"value": "北歐"
			},
			{
				"name": "幾人坐",
				"value": "腳踏90*60*48cm 雙人165*95*67cm 三人210*95*67cm 單人100*95*67cm 四人位240*95*67cm 大四人320*95*76cm 3米貴妃沙發 定製尺寸"
			},
			{
				"name": "顏色分類",
				"value": "乳白色"
			},
			{
				"name": "填充物",
				"value": "海綿"
			},
			{
				"name": "結構工藝",
				"value": "木質工藝"
			},
			{
				"name": "是否可定製",
				"value": "是"
			},
			{
				"name": "沙發組合形式",
				"value": "U形"
			},
			{
				"name": "是否可拆洗",
				"value": "是"
			},
			{
				"name": "適用物件",
				"value": "成年人"
			},
			{
				"name": "是否帶儲物空間",
				"value": "否"
			},
			{
				"name": "產地",
				"value": "上海"
			},
			{
				"name": "地市",
				"value": "上海市"
			},
			{
				"name": "區縣",
				"value": "奉賢區"
			},
			{
				"name": "是否組裝",
				"value": "否"
			},
			{
				"name": "計程車是否可運輸",
				"value": "否"
			},
			{
				"name": "填充物硬度",
				"value": "軟"
			},
			{
				"name": "款式定位",
				"value": "經濟型"
			}
		],
		"total_sold": "35",
		"skus": {
			"sku": [
				{
					"price": 480,
					"total_price": 0,
					"orginal_price": 480,
					"properties": "31480:14306495906;1627207:28321",
					"properties_name": "31480:14306495906:幾人坐:腳踏90*60*48cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "4881047531343"
				},
				{
					"price": 1688,
					"total_price": 0,
					"orginal_price": 1688,
					"properties": "31480:14306495907;1627207:28321",
					"properties_name": "31480:14306495907:幾人坐:雙人165*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 153,
					"sku_id": "4881047531344"
				},
				{
					"price": 2088,
					"total_price": 0,
					"orginal_price": 2088,
					"properties": "31480:14306495908;1627207:28321",
					"properties_name": "31480:14306495908:幾人坐:三人210*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "4881047531345"
				},
				{
					"price": 968,
					"total_price": 0,
					"orginal_price": 968,
					"properties": "31480:14306495909;1627207:28321",
					"properties_name": "31480:14306495909:幾人坐:單人100*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "4881047531346"
				},
				{
					"price": 2388,
					"total_price": 0,
					"orginal_price": 2388,
					"properties": "31480:21480914361;1627207:28321",
					"properties_name": "31480:21480914361:幾人坐:四人位240*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "5039985183001"
				},
				{
					"price": 3188,
					"total_price": 0,
					"orginal_price": 3188,
					"properties": "31480:21480914362;1627207:28321",
					"properties_name": "31480:21480914362:幾人坐:大四人320*95*76cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "5039985183002"
				},
				{
					"price": 3400,
					"total_price": 0,
					"orginal_price": 3400,
					"properties": "31480:1387571900;1627207:28321",
					"properties_name": "31480:1387571900:幾人坐:3米貴妃沙發;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "5039984824000"
				},
				{
					"price": 3000,
					"total_price": 0,
					"orginal_price": 3000,
					"properties": "31480:32527954;1627207:28321",
					"properties_name": "31480:32527954:幾人坐:定製尺寸;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
					"quantity": 200,
					"sku_id": "5039985183003"
				}
			]
		},
		"seller_id": "2568161054",
		"sales": 35,
		"shop_id": "567158267",
		"props_list": {
			"1627207:28321": "顏色分類:乳白色 尺寸顏色可定製",
			"31480:14306495906": "幾人坐:腳踏90*60*48cm",
			"31480:14306495907": "幾人坐:雙人165*95*67cm",
			"31480:14306495908": "幾人坐:三人210*95*67cm",
			"31480:14306495909": "幾人坐:單人100*95*67cm",
			"31480:21480914361": "幾人坐:四人位240*95*67cm",
			"31480:21480914362": "幾人坐:大四人320*95*76cm",
			"31480:1387571900": "幾人坐:3米貴妃沙發",
			"31480:32527954": "幾人坐:定製尺寸"
		},
		"seller_info": {
			"nick": "惜情yqq1127",
			"item_score": 4.97887,
			"score_p": 4.98239,
			"delivery_score": 4.97183,
			"shop_type": "",
			"user_num_id": "2568161054",
			"sid": "567158267",
			"title": "",
			"zhuy": "
			"cert": null,
			"open_time": "",
			"credit_score": null,
			"shop_name": "現代布藝沙發"
		},
		"tmall": false,
		"error": "",
		"location": "江蘇南通",
		"data_from": "Ha",
		"has_discount": "false",
		"is_promotion": "false",
		"promo_type": null,
		"props_img": {
			"1627207:28321": "!!2568161054.jpg"
		},
		"format_check": "ok",
		"desc_img": [
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg",
			"!!2568161054.jpg"
		],
		"shop_item": [],
		"relate_items": []
	},


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69952502/viewspace-2943838/,如需轉載,請註明出處,否則將追究法律責任。

相關文章