Still stuck with issue, still not very sure what is going on, any tips to
narrow down the problem ?
Many Thanks !
On Mon, Aug 1, 2011 at 2:09 AM, boghra <boghra at gmail.com> wrote:
> Hi,
>
> Just first day with Mechanize and I am trying to access facebook fan page
> wall posts i.e. facebook.com/walmart?sk=wall, example:
>
> require ''rubygems''
> require ''mechanize''
>
> agent = Mechanize.new
> agent.user_agent_alias = ''Windows Mozilla''
> page = agent.get(''http://www.facebook.com'')
>
> form = page.form_with(:id => ''login_form'')
> # just removed actual username password
> form.email = ''fb-user-name''
> form.pass = ''fb-password''
> page = agent.submit(form)
>
> page = agent.get("/walmart?sk=wall")
> span = page.search
"//span[@class=''messageBody'']"
> puts span
>
> puts span doesn''t print anything (and actual page has spans with
given
> class name) and if try to print page.body, for all html opening tag
''<'' are
> printed as \u and html gets escaped, not sure how to tell it to use utf
> encoding ? also not sure why things get escaped ? please advice !
>
> Thanks,
> Boghra
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/mechanize-users/attachments/20110801/ff069468/attachment.html>