Java HTML Parse Jsoup getHtml(String url, String ruta_fich)

Here you can find the source of getHtml(String url, String ruta_fich)

Description

Gets the html.

License

Open Source License

Parameter

Parameter Description
url the url
ruta_fich the ruta_fich

Exception

Parameter Description
IOException Signals that an I/O exception has occurred.

Return

the html

Declaration

public static Document getHtml(String url, String ruta_fich) throws IOException 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class Main {
    /**/*from ww  w .  j av a  2 s .  c  om*/
     * Gets the html.
     *
     * @param url
     *            the url
     * @param ruta_fich
     *            the ruta_fich
     * @return the html
     * @throws IOException
     *             Signals that an I/O exception has occurred.
     */
    public static Document getHtml(String url, String ruta_fich) throws IOException {

        Document doc = Jsoup.connect(url).timeout(0).get();

        return doc;
    }

    /**
     * Gets the html.
     *
     * @param url
     *            the url
     * @return the html
     * @throws IOException
     *             Signals that an I/O exception has occurred.
     */
    public static Document getHtml(String url) throws IOException {

        Document doc = Jsoup.connect(url).timeout(0).get();

        return doc;
    }
}

Related

  1. getErrorMessage(String htmlStr)
  2. getExplanation(String html)
  3. getFirstImageSrc(String html)
  4. getFirstSentence(final String html)
  5. getFirstTableFromHTML(String result)
  6. getHtmlBodyContent(String html)
  7. getHtmlInTag(String html, String tag)
  8. getImageCredit(String html)
  9. getJSFileLinks(String html)