public final YoutubeInformation getYoutubeInformation() throws IOException, DecoderException,
            MissingYoutubeUrlException {
        if (youtubeUrl == null) {
            throw new MissingYoutubeUrlException("Youtube url is missing.");
        }

        YoutubeInformation youtubeInformation = null;
        CloseableHttpClient client = HttpClients.createDefault();
        HttpGet getMethod = new HttpGet(youtubeUrl);
        getMethod.addHeader("Accept", "*/*");
        getMethod.addHeader("Accept-Language", "en-GB,en;q=0.8");
        getMethod.addHeader("Accept-Encoding", "deflate");
        getMethod.addHeader("Referer", youtubeUrl);
        getMethod.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)"
                + " Chrome/35.0.1916.114 Safari/537.36");
        CloseableHttpResponse response = client.execute(getMethod);

        if (response != null) {
            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                HttpEntity entity = response.getEntity();

                if (entity != null) {
                    InputStream inputStream = entity.getContent();
                    String encoding = "UTF-8";
                    StringWriter writer = new StringWriter();
                    IOUtils.copy(inputStream, writer, encoding);
                    String htmlEntity = writer.toString();
                    youtubeInformation = new YoutubeInformation(htmlEntity);
                }
            }
        }

        return youtubeInformation;
    }