org.apache.nutch.protocol.htmlunit

## Class HtmlUnitWebDriver

- java.lang.Object
- - HtmlUnitDriver
  - - org.apache.nutch.protocol.htmlunit.HtmlUnitWebDriver

-     public class HtmlUnitWebDriver
      extends HtmlUnitDriver

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlUnitWebDriver()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `cleanUpDriver(WebDriver driver)`
    `static WebDriver` | `getDriverForPage(java.lang.String url, Configuration conf)`
    `static java.lang.String` | `getHTMLContent(WebDriver driver, Configuration conf)`
    `static java.lang.String` | `getHtmlPage(java.lang.String url, Configuration conf)` Function for obtaining the HTML BODY using the selected selenium webdriver There are a number of configuration properties within `nutch-site.xml` which determine whether to take screenshots of the rendered pages and persist them as timestamped .png's into HDFS.
    `protected WebClient` | `modifyWebClient(WebClient client)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HtmlUnitWebDriver

          public HtmlUnitWebDriver()

  - ### Method Detail

    - #### modifyWebClient

          protected WebClient modifyWebClient(WebClient client)

    - #### getDriverForPage

          public static WebDriver getDriverForPage(java.lang.String url,
                                                   Configuration conf)

    - #### getHTMLContent

          public static java.lang.String getHTMLContent(WebDriver driver,
                                                        Configuration conf)

    - #### cleanUpDriver

          public static void cleanUpDriver(WebDriver driver)

    - #### getHtmlPage

          public static java.lang.String getHtmlPage(java.lang.String url,
                                                     Configuration conf)

      Function for obtaining the HTML BODY using the selected selenium webdriver There are a number of configuration properties within `nutch-site.xml` which determine whether to take screenshots of the rendered pages and persist them as timestamped .png's into HDFS.
      Parameters:
        `url` - the URL to fetch and render
        `conf` - the `Configuration`
      Returns:
        the rendered inner HTML page

Copyright © 2019 The Apache Software Foundation