ruby - Matching URL structures with Anemone -
right now, i'm doing following anemone:
anemone.crawl("http://www.findbrowsenodes.com/", :delay => 3) |anemone| anemone.on_every_page | page |
but
anemone.crawl("http://www.findbrowsenodes.com/", :delay => 3) |anemone| anemone.on_pages_like() | page |
instead crawl urls 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?
you can use regular expression this
/http:\/\/www.findbrowsenodes.com\/us\/.+\/[\d]*/
Comments
Post a Comment