2

Right now, I'm doing the following with Anemone:

Anemone.crawl("http://www.findbrowsenodes.com/", :delay => 3) do |anemone|
  anemone.on_every_page do | page |

But I would like to do    

Anemone.crawl("http://www.findbrowsenodes.com/", :delay => 3) do |anemone|
   anemone.on_pages_like() do | page |

instead to only crawl from URLs like this:

http://www.findbrowsenodes.com/us/Apparel/1036682 http://www.findbrowsenodes.com/us/Apparel/1040664 http://www.findbrowsenodes.com/us/ArtsAndCrafts/2617942011 http://www.findbrowsenodes.com/us/Baby/165797011

Any ideas how?

alexchenco
  • 53,565
  • 76
  • 241
  • 413

1 Answers1

3

you can use a regular expression like this

/http:\/\/www.findbrowsenodes.com\/us\/.+\/[\d]*/
rhernando
  • 1,051
  • 7
  • 18
  • Thanks it worked! But just one thing, at the beginning it includes this URL: `http://www.findbrowsenodes.com/us/p/what-are-browse-nodes` How can I modify the regex to avoid that? – alexchenco Sep 05 '13 at 02:11