如何自动导航到需要身份验证的网站? [英] How do I automate navigation to a website that requires authentication?

查看:147
本文介绍了如何自动导航到需要身份验证的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我正在努力实现的。我想编写一个脚本,它将导航到需要我自己认证的网站,Facebook,Live Spaces,Twitter或其他任何内容,然后在该网站的某个页面上搜索某些信息。

Here's what I'm trying to achieve. I would like to write a script that will navigate to a website that requires me to be authenticated as myself, say Facebook, Live Spaces, Twitter or any other, and then have that script search for certain information on one of the pages of the website.

我以前用过Windows.Forms WebBrowser控件做了类似的工作,这是一个完整的IE实现,可以通过代码来控制,一旦你被认证,你得到的任何cookie,但它是非常不友好的修改,我希望使用脚本语言,而不是Powershell或类似的东西。

I've done something similar in the past with the Windows.Forms WebBrowser control, which is a full blown implementation of IE that can be controlled through code and will store whatever cookies you get once you're authenticated, but it was very unfriendly to modify and I was hoping to use a scripting language instead, maybe Powershell or something of that sort.

在网上可能有一些很好的教程吗?

Are there maybe some good tutorials about this out there on the web?

谢谢!

推荐答案

如果您是首选的Python,请机械化 + 斜纹美丽的汤

请查看SO 屏幕抓取标签。

If Python is your first choice, Mechanize + Twill + Beautiful Soup.
Have a look to SO screen-scraping tag too.

这篇关于如何自动导航到需要身份验证的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆