@Override
	protected void download() throws Exception {
		ChartInputDto chartInput = this.getInput();

        Util.print("Fetching %s&%s=%s&%s=%s&%s=%s", Constant.SEARCH_URL, Constant.CHART_PREFIX, chartInput.getChartPrefix(), Constant.CHART_NUMBER, chartInput.getChartNumber(), Constant.CHART_SUFFIX, chartInput.getChartSuffix());

        Document doc;
        try {
	        doc = Util.getConnection(Constant.SEARCH_URL)
                .cookies(cookies)
                .data(Constant.CHART_PREFIX, chartInput.getChartPrefix())
                .data(Constant.CHART_NUMBER, chartInput.getChartNumber())
                .data(Constant.CHART_SUFFIX, chartInput.getChartSuffix())
                .post();
        } catch(Exception e1) {
	    	try {
		        doc = Util.getConnection(Constant.SEARCH_URL)
	                .cookies(cookies)
	                .data(Constant.CHART_PREFIX, chartInput.getChartPrefix())
	                .data(Constant.CHART_NUMBER, chartInput.getChartNumber())
	                .data(Constant.CHART_SUFFIX, chartInput.getChartSuffix())
	                .post();
	    	} catch(Exception e2) {
		    	try {
			        doc = Util.getConnection(Constant.SEARCH_URL)
		                .cookies(cookies)
		                .data(Constant.CHART_PREFIX, chartInput.getChartPrefix())
		                .data(Constant.CHART_NUMBER, chartInput.getChartNumber())
		                .data(Constant.CHART_SUFFIX, chartInput.getChartSuffix())
		                .post();
		    	} catch(Exception e3) {
			    	throw e3;
			    }
		    }
	    }

        if (doc != null) {
	        Elements tbodies = doc.getElementsByTag("tbody");
	        Boolean found = this.extractTbodies(tbodies);

	        String nextPage = null;
	        while (!found && (nextPage = this.nextPage(doc)) != null) {
	        	try {
	        		doc = Util.getConnection(Constant.MAIN_URL + nextPage).cookies(cookies).get();
	        	} catch(Exception e1) {
	        		try {
		        		doc = Util.getConnection(Constant.MAIN_URL + nextPage).cookies(cookies).get();
		        	} catch(Exception e2) {
		        		try {
			        		doc = Util.getConnection(Constant.MAIN_URL + nextPage).cookies(cookies).get();
			        	} catch(Exception e3) {
			        		throw e3;
			        	}
		        	}
	        	}
	            tbodies = doc.getElementsByTag("tbody");
	            found = this.extractTbodies(tbodies);
	            Util.print("----- Done %s", Constant.MAIN_URL + nextPage);
	        }
        }
    }