所以我试图提取我的网站使用红宝石机械化和hpricot的电子邮件。 什么我试图做我的行政管理方面的所有页面上的循环,并用hpricot.so解析页面非常好。然后我得到: Exception `Net::HTTPBadResponse' at /usr/lib/ruby/1.8/net/http.rb:2022 - wrong status line: *SOME HTML CODE HERE*
import mechanize
url = 'http://steamcommunity.com'
br=mechanize.Browser(factory=mechanize.RobustFactory())
br.open(url)
print br.request
print br.form
for each in br.forms():
print each