Class GenericUrlScopeResolver

java.lang.Object
com.norconex.crawler.core.event.listeners.CrawlerLifeCycleListener
com.norconex.crawler.web.doc.operations.scope.impl.GenericUrlScopeResolver
All Implemented Interfaces:
Configurable<GenericUrlScopeResolverConfig>, EventListener<Event>, UrlScopeResolver, EventListener, Consumer<Event>

public class GenericUrlScopeResolver extends CrawlerLifeCycleListener implements UrlScopeResolver, Configurable<GenericUrlScopeResolverConfig>

By default a crawler will try to follow all links it discovers. You can define your own filters to limit the scope of the pages being crawled. When you have multiple URLs defined as start URLs, it can be tricky to perform global filtering that apply to each URLs without causing URL filtering conflicts. This class offers an easy way to address a frequent URL filtering need: to "stay on site". That is, when following a page and extracting URLs found in it, make sure to only keep URLs that are on the same site as the page URL we are on.

By default this class does not request to stay on a site.

Since:
2.3.0