问题描述
下面就是我想要的目的。我想编写一个脚本,将导航到一个网站,要求我被认证为我自己,说Facebook的,Live Spaces的,微博或任何其他,然后对某些信息,该脚本搜索网站上的页面之一
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浏览器的一个完全成熟的实现,可通过code进行控制,将存储你得到什么饼干一旦你验证了过去类似的东西,但它是非常不友好的修改和我希望使用脚本语言,而不是,也许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.
这篇关于我如何自动导航到一个网站,需要验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!