我正在try 解析这个页面:https://www.mashina.kg/details/kia-sorento-64631fe26592a662606296
有一个电话号码按钮隐藏了 电话号码.点击一下,AJAX POST请求就会带来完整的电话号码.
我如何才能在Python中伪造这个POST请求?
导入请求、时间、json 从BS4导入BeautifulSoup
标题={ "Accept":"文本/html,应用程序/xhtml+xml,应用程序/xml;q=0.9,图像/avf,图像/WebP,图像/apng,/;q=0.8,应用程序/签名交换;v=b3;q=0.7", "用户代理":"Mozilla/5.0(Windows NT10.0;Win64;x64)AppleWebKit/537.36(khtml,如壁虎)Chrome/113.0.0.0 Safari/537.36", } S=请求.会话()
响应=s.get( "https://www.mashina.kg/details/kia-sorento-64631fe26592a662606296",标头=标头 )
SOUP=BeautifulSoup(Response.text,"lxml")