I''m trying to write a website that parses all images in a given webpage. I initially tried to get all image links by looking for <img> tag, by using nokogiri html parser, and it works well with webpages without javascript. Some pages use javascript to render the view, and using nokogiri, I''m just getting raw html results before it''s rendered. How can I get a page after being rendered by javascript? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
parkurm wrote:> I''m trying to write a website that parses all images in a given > webpage. I initially tried to get all image links by looking for <img> > tag, by using nokogiri html parser, and it works well with webpages > without javascript. > > Some pages use javascript to render the view, and using nokogiri, I''m > just getting raw html results before it''s rendered. > > How can I get a page after being rendered by javascript?Webrat + Selenium would be one way. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You can try with http://scrubyt.org/index.html that is like mechanize but supports javascript. On Feb 2, 2:37 pm, parkurm <park...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m trying to write a website that parses all images in a given > webpage. I initially tried to get all image links by looking for <img> > tag, by using nokogiri html parser, and it works well with webpages > without javascript. > > Some pages use javascript to render the view, and using nokogiri, I''m > just getting raw html results before it''s rendered. > > How can I get a page after being rendered by javascript?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.