Python京东价格爬取为空 可以去看 https://www.cnblogs.com/xxh12/p/16726546.html

京东价格爬取为空,正则/beautifulsoup/lxml都获取不到价格信息

原因:
由于网页html动态加载了数据,所以在检查模式下能看到价格,但是实际上用正则/beautifulsoup/lxml都获取不到价格信息。

 

解决:

https://p.3.cn/prices/mgets?skuIds=J_”+product_id 获取相应价格信息

 

比如  

https://p.3.cn/prices/mgets?skuIds=J_100035927374 获取相应价格信息

 

posted @ 2022-09-04 20:48  python,菜鸟  阅读(198)  评论(0)    收藏  举报