【发布时间】:2011-06-26 22:20:08
【问题描述】:
我已使用 Mechanize 登录到网页/servlet。
我有一个页面对象:
jobShortListPg = agent.get(addressOfPage)
当我使用时:
puts jobShortListPg
我得到了我不想要的页面的“机械化”版本:
#<Mechanize::Page::Link "Home" "blahICScriptProgramName=WEBLIB_MENU.ISCRIPT3.FieldFormula.IScript_DrillDown&target=main0&Level=0&RL=&navc=3171">
如何获取页面的 HTML 源代码?
【问题讨论】:
-
在 Ruby 中,我们使用snake_case,而不是camelCase 来表示变量或方法名。 ItIsAReadabilityThing。