js-crawler icon indicating copy to clipboard operation
js-crawler copied to clipboard

Would be awesome to apply a selector to limit scope of crawled links

Open duggi opened this issue 9 years ago • 1 comments

for example:

crawler.crawl({
  url: "http://localhost:8080/locations/",
  selector: ".main-content"

would only follow the links found inside .main-content

this way i don't have to keep crawling the header, footer, sidebars, etc on every page


thank you for writing this!

duggi avatar Oct 31 '15 17:10 duggi

Hi,

It can be an interesting feature, the only problem is that at the moment the crawler does not deal with the page content as DOM, it is just a text content. But maybe we can limit the section of the page which should be crawled in some other way. I will investigate this a bit more.

amoilanen avatar Nov 01 '15 20:11 amoilanen