postmodern/spidr

Crawling a specific page

justaj opened this issue · 2 comments

Hey! I was wondering if there was a way to return all links found on a specific page. So far spidr has been great for crawling a whole site but with my testing I'd like to be able to focus on one page.

Thanks

You could use every_page { |page| ... } and filter if page.url.path == '...' for the page you are looking for? Also, you could use visit_urls_like to only visit that specific page.

Oh, you could also manually request the page via net-http, mechanize, RestClient, etc and manually create a Spidr::Page object.