long targetEndTime = hasEndTime ? System.currentTimeMillis() + (crawlDurationInMinutes * CrawlConfig.MILLISECONDS_PER_MINUTE) :
FetcherPolicy.NO_CRAWL_END_TIME;
// By setting up a url filter we only deal with urls that we want to
// instead of all the urls that we extract.
BaseUrlFilter urlFilter = null;
List<String> patterns = null;
String regexUrlFiltersFile = options.getRegexUrlFiltersFile();
if (regexUrlFiltersFile != null) {
patterns = RegexUrlFilter.getUrlFilterPatterns(regexUrlFiltersFile);
} else {