简体   繁体   English

如何在服务器端的假浏览器中运行操作?

[英]How to run actions in a fake-browser on the server side?

I need to simulate a user session (login, click, click, enter data) followed by an html page download on the server side. 我需要模拟用户会话(登录,单击,单击,输入数据),然后在服务器端模拟html页面下载。

What are my options, if any? 我有什么选择?

Python-requests was my first thought, but it can't run javascript--which is why I need to simulate a fake google-chrome/firefox session on the server side. 我首先想到了Python请求,但它无法运行javascript,这就是为什么我需要在服务器端模拟一个伪造的google-chrome / firefox会话。

If you don't mind working in C#, WatiN ( http://watin.org/ ) sounds like it's the type of tool you're looking for. 如果您不介意使用C#,WatiN( http://watin.org/ )听起来就像是您正在寻找的工具类型。 I've used it to log into websites, navigate, etc. 我用它来登录网站,导航等。

You can reference this StackOverflow for downloading the HTML source: How to get complete html content using WatiN properties 您可以参考此StackOverflow来下载HTML源代码: 如何使用WatiN属性获取完整的html内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM