public List<Recipe> search(String search){
        Document doc = null;
        try {
            doc = Jsoup.connect("http://www.recept.nu/search?searchtext="+search+"&orderby=relevance").get();
        } catch (IOException ex) {
            Logger.getLogger(RecipeSearch.class.getName()).log(Level.SEVERE, null, ex);
        }
        List<Recipe> searchResult = new ArrayList<>();
        Element page = doc.getElementsByClass("page").get(0);
        Elements recipeContainers = page.getElementsByClass("recipie-list__container");
        if (recipeContainers.size()>2) {
            recipeContainers.remove(2);
        }
        for (Element recipeContainer : recipeContainers) {
            //System.out.println(recipeContainer.html());
            for (Element recipeFront : recipeContainer.getElementsByClass("recipie-list__item")) {
                Recipe recipeToMake = new Recipe();
                Element recipe = recipeFront.getElementsByClass("recipie-list__front").first();
                //get link
                Element linktag = recipe.getElementsByTag("a").first();
                recipeToMake.setLink(linktag.absUrl("href"));
                System.out.println(recipeToMake.getLink());
                // System.out.println(recipe.html());
                //Get imgURL
                Elements imghtml = recipe.getElementsByTag("img");
                recipeToMake.setImgUrl(imghtml.first().absUrl("data-original"));
                //Get name of the recipe
                recipeToMake.setName(recipe.getElementsByTag("h2").text());
                searchResult.add(recipeToMake);
            }
        }
        return searchResult;
    }