public static void extractFromHTML(String theURL) throws URISyntaxException,
            ParserException, IOException {
        URL url = new URL("file:" + theURL);
        URLConnection con = url.openConnection();
        Pattern p = Pattern.compile("text/html;\\s+charset=([^\\s]+)\\s*");
        Matcher m = p.matcher(con.getContentType());
        /*
         * If Content-Type doesn't match this pre-conception, choose default and
         * hope for the best.
         */
        String charset = m.matches() ? m.group(1) : "ISO-8859-1";
        Reader r = new InputStreamReader(con.getInputStream(), charset);
        StringBuilder buf = new StringBuilder();
        while (true) {
            int ch = r.read();
            if (ch < 0) {
                break;
            }
            buf.append((char) ch);
        }
        String str = buf.toString();

        String[] renta_repeater = str.split("renta_repeater");
        ArrayList<String> renta_repeater_filtered = new ArrayList();
        for (String rr : renta_repeater) {
            if (rr.contains("renta_publicado")) {
                renta_repeater_filtered.add(rr);
            }
        }
        for (String al : renta_repeater_filtered) {
            String code = "";
            String date = ""; //os_ctl01_CodigoRenta" value="
            Pattern codepat = Pattern.compile("CodigoRenta\" value=\"(.*?)\" />");
            Matcher matcher = codepat.matcher(al);
            //System.out.println(al);
            if (matcher.find()) {
                System.out.println(matcher.group(1));
                code = matcher.group(1);
            }
            Pattern datepat = Pattern.compile("\"renta_publicado\">(.*?)</div>");
            Matcher datematcher = datepat.matcher(al);
            if (datematcher.find()) {
                System.out.println(datematcher.group(1));
                date = datematcher.group(1);
            }
            hasht1.put(code, date);
        }
    }