@SuppressWarnings("unchecked")
	private void parsing(final String threadName, final Collection<URL> set, final CrawlerConfig config,
			final boolean isUpdate) throws RuntimeException {
		if (set == null) {
			throw new IllegalArgumentException("urlsToCrawl must not be null!");
		}
		if(isUpdate){
			logger.info(config.getName() + " ready to update " + set.size() + " pages");
		}else{
			logger.info(config.getName() + " ready to crawl " + set.size() + " pages");
		}

		try {
			Parser parser = config.getParser();
			if (parser == null) {
				logger.error(threadName + " config parser is null");
				Class<Parser> c = (Class<Parser>)Class.forName(config.getParserName());
				parser = c.newInstance();
			}
			for (URL url : set) {
				Threads.sleep(config.getDelay());
				HttpFetchResult result = httpClient.requestHttpGet(config, url);
				if (result != null && StringUtils.isNotEmpty(result.getHtml())) {
					parser.parse(result, url.toFullString(), threadName, isUpdate);
					result.consume();
				}
			}
		} catch (RuntimeException e) {
			throw e;
		} catch (Throwable e) {
			throw new RuntimeException(e.getMessage(), e);
		}
	}