System.exit(-1);
}
String targetURL = args[0];
// Create parser factory. Support basic HTML markup only
ParserFactory parserFactory = new ParserFactory();
HtmlParser htmlParser = new HtmlParser();
htmlParser.setElements(new HashMap<String, String>());
htmlParser.getElements().put("a", "href");
htmlParser.getElements().put("link", "href");
htmlParser.getElements().put("img", "src");
htmlParser.getElements().put("script", "src");
parserFactory.setMap(new HashMap<String, Object>());
parserFactory.getMap().put("text/html", htmlParser);
// Create protocol factory. Support HTTP/S only.
ProtocolFactory protocolFactory = new ProtocolFactory();
// Create and configure HTTP client