From: tamouse mailing lists Date: 2012-12-12T15:15:28+09:00 Subject: Re: Mechanize problem. On Tue, Dec 11, 2012 at 5:00 PM, cristian cristian wrote: > Hi! > I rarely code but when I try I use Ruby. So this is a beginners problem > :) > > Im trying to fetch a number from a website and im using mechanize but it > seems to be impossible. Im doing this: > > require 'Mechanize' > agent = Mechanize.new > agent.get("http://www.linasmatkasse.se") > agent.page.search('#counter') > > This div should contain a value but it doesnt. I get this in irb: > > [# attributes=[# value="counter">]>] > > This div contains a number like 26 100 002 when looking at the website. > > What is it that im doing wrong? > > Any suggestion is appreciated! :) > > Br > cristian > > -- > Posted via http://www.ruby-forum.com/. > When you just load the html, that div is empty:
One of the scripts on that page is filling it in.