在特定时间单击链接的脚本
我有兴趣编写一个在特定时间访问网站并单击链接的脚本。我该如何去做这样的事情呢?
I am interested in writing a script that goes to a website and clicks a link at a certain time. How do I go about doing something like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该使用硒 http://seleniumhq.org/
您可以使用您在标签中指定的任何语言来控制它。
您可以从以下位置开始浏览
http://seleniumhq.org/projects/remote-control/
You should use selenium http://seleniumhq.org/
You can control it using anyone of the language you specified in the tags.
You can start to browse from
http://seleniumhq.org/projects/remote-control/
“单击链接”可能有两种含义:
实际上单击浏览器中的链接,或者只是执行由此产生的 HTTP GET。这可以像在桌面上运行并模拟在某个点上单击的软件一样简单,也可以像 Selenium 用于网站交互的自动化。
如果您只需要执行单击链接即可执行的 GET 请求,那么任何操作都可以。 Unix 系统通常包括
wget
和curl
,它们采用 url 进行请求。或者,如果您想处理数据,您可以使用大多数编程语言来完成此操作。例如,在 python 中,您可以执行 urllib2.urlopen('http://stackoverflow.com'),然后对数据执行任何您想要的操作。 Perl 有一个等价的。"clicking a link" could have two meanings:
Actually clicking the link in a browser, or just doing an HTTP GET that would result from it. This could be as simple as software that runs on your desktop and simulates a click at a certain point, to something as complicated as Selenium for automation of website interactions.
If you just need to do the GET request that clicking the link would do, anything would do. Unix systems typically include
wget
andcurl
, which take a url to request. Or if you want to process the data, you can do this in most programming languages. For example, in python you could dourllib2.urlopen('http://stackoverflow.com')
and then do whatever you want with the data. Perl has an equivalent.你熟悉cURL吗?
Are you familiar with cURL?