ruby on rails - Trouble with parsing source html with Nokogiri -


i'm trying use nokogiri select dom element seems returning empty array.

i run code:

require "open-uri" require "nokogiri"  doc = nokogiri::html(open("http://twitter.com/#!/ladygaga")) 

and returns whole source code parsed nokogiri.

however, when run

doc.css(".stream-tweet") 

it returns empty array. .stream-tweet class multiple div elements @ http://twitter.com/#!/ladygaga found inspecting source code.

what's going on here?

because there no div element stream-tweet class if @ doc.
div loads afterwards ajax request twitter api.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -