我正在尝试删除此页(例如): https://super.walmart.com.mx/papel-higienico/papel-higienico-petalo-rendimax-12-rollos-con-320-hojas-dobles/00750194345845
。。。以获得产品价格。通过html请求,我可以在其他页面中获得动态内容,但在沃尔玛上不起作用。我知道我可以用selenium做到这一点,但我正在试图理解为什么它不能处理html请求,以及(如果可能的话)如何做到这一点
这是我当前的代码:
import requests_html as rh
session = rh.HTMLSession()
r = session.get("https://super.walmart.com.mx/papel-higienico/papel-higienico-petalo-rendimax-12-rollos-con-320-hojas-dobles/00750194345845")
r.html.render()
r.html.find('.main-content_rightContainer__3_cSi',first=True).text
目前没有回答
相关问题 更多 >
编程相关推荐