public Map<String, String> grab() throws MalformedURLException, IOException {

        Document doc = Jsoup.connect(link).get();
        Elements ids = doc.select("#offers_table td > table");
        Map<String, Integer> map = new HashMap<>();
        String line, line2;
        StringBuilder builder;
        int idPosition, counter = 0;
        for (int i = 0; i < ids.size(); i++) {
            builder = new StringBuilder(ids.get(i).className());
            if (builder.indexOf(" ad_") != -1) {
                idPosition = builder.indexOf(" ad_");
                line = builder.substring(idPosition + 4, idPosition + 11);
                map.put(line, counter++);
//                System.out.println(counter + ". " +line);
            }
        }

        Set<String> ss = map.keySet();
        for (String s : ss) {
            Elements ids2 = doc.select("a[href*=" + s + "]");
            StringBuilder sb = new StringBuilder(ids2.get(0).toString());
            int start, end;
            if ((start = sb.indexOf("alt=")) != -1) {
                end = sb.indexOf(" />");
//                System.out.print(s + ". ");
                line2 = sb.substring(start + 5, end - 1);
                currentMap.put(s, line2);
//                System.out.println(line2);
            } else {
                start = sb.indexOf("<span>");
                end = sb.indexOf("</span>");
//                System.out.print(s + ". ");
                line2 = sb.substring(start + 6, end);
                currentMap.put(s, line2);
//                System.out.println(line2);
            }

        }

        return currentMap;
    }