Sunday 15 March 2015

ruby - anemone print links on first page -


wanted to see what I was doing wrong here.

I have to print the link on the original page, even to the other domain. And exit.

  Expected 'anemone' url = ARGV [0] Anime Crowel (URL, Depth_Limit => 1). Anemone | Anemone.on_every_page | Page | Page.links.each do | Link | Say link end end end   

Am I not doing right?

Edit: Outputs nothing.

This worked for me

  needed 'anemone' Is 'optparse' file = ARVV [0] file. Open (file). Url | Url = URI.parse (URI.encode (url.strip)) Anemone.crawl (url ,: discard_page_bodies = & gt; true) what to do. Anemone | Anemone.on_every_page | Page | Links = page.doc.xpath ("// a / @ href") if (link! = Zero) links.each do | Link | Say link.to_s end end end and end    

No comments:

Post a Comment