我想把请求发送到dwr服务器,有效负载日期如下:
callCount=1
c0-scriptName=Manager
c0-id=3992_1389451476736
c0-param1=string:
c0-param15=string:
c0-param16=string:-1
c0-param17=string:1
xml=true
我使用requests python我的第一个问题是我不知道什么样的数据接受dwr(字符串、json或…)我的代码
^{pr2}$反应是
//<script type='text/javascript'>
alert('Error. This may be due to an unsupported browser.\nSee the mailing lists at http://www.getahead.ltd.uk/dwr/ for more information.');
//</script>
对每一个想法和帮助心存感激 谢谢
以前从没听说过
dwr
,我快速浏览了一下,找到了{a1}网站。因为它看起来需要在客户端上理解JavaScript的东西,所以不能单独使用请求。在请求不会对网页内容进行任何处理。由于请求不能为您处理JavaScript,所以您需要使用更像selenium(它在python中有绑定)。在
在混合使用类似selenium的东西时,您可能需要将请求中的
User-Agent
头更改为看起来像真正的浏览器的东西。您的请求看起来像:其中
^{pr2}$'<browser user agent>'
是从浏览器获取的字符串。一个可能有用的例子是或者
相关问题 更多 >
编程相关推荐