python 获取 某东商品评论数

参考
京东的商品评论数是异步渲染的


comment_url = f"https://club.jd.com/comment/productCommentSummaries.action?referenceIds={pids}"  # pids 是商品id

结果

{
	"CommentsCount": [{
		"SkuId": 68533814380,
		"ProductId": 68533814380,
		"ShowCount": 0,
		"ShowCountStr": "200+",
		"CommentCountStr": "2万+",    # 评论数
		"CommentCount": 0,
		"AverageScore": 5,
		"DefaultGoodCountStr": "2万+",
		"DefaultGoodCount": 0,
		"GoodCountStr": "5500+",
		"GoodCount": 0,
		"AfterCount": 0,
		"OneYear": 0,
		"AfterCountStr": "50+",
		"VideoCount": 0,
		"VideoCountStr": "10+",
		"GoodRate": 0.96,
		"GoodRateShow": 96,
		"GoodRateStyle": 144,
		"GeneralCountStr": "80+",
		"GeneralCount": 0,
		"GeneralRate": 0.015,
		"GeneralRateShow": 2,
		"GeneralRateStyle": 2,
		"PoorCountStr": "100+",
		"PoorCount": 0,
		"SensitiveBook": 0,
		"PoorRate": 0.025,
		"PoorRateShow": 2,
		"PoorRateStyle": 4
	}]
}

怎么获取商品的id,每个人有自己的方法 就不写了

posted @ 2021-05-07 17:22  wzqwer  阅读(250)  评论(0编辑  收藏  举报