org.apache.nutch.protocol.selenium

## Class HttpWebClient

- java.lang.Object
- - org.apache.nutch.protocol.selenium.HttpWebClient

-     public class HttpWebClient
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpWebClient()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `cleanUpDriver(WebDriver driver)`
    `static RemoteWebDriver` | `createChromeRemoteWebDriver(java.net.URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static WebDriver` | `createChromeWebDriver(java.lang.String chromeDriverPath, boolean enableHeadlessMode)`
    `static RemoteWebDriver` | `createDefaultRemoteWebDriver(java.net.URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static RemoteWebDriver` | `createFirefoxRemoteWebDriver(java.net.URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static WebDriver` | `createFirefoxWebDriver(java.lang.String firefoxDriverPath, boolean enableHeadlessMode)`
    `static WebDriver` | `createOperaWebDriver(java.lang.String operaDriverPath, boolean enableHeadlessMode)`
    `static RemoteWebDriver` | `createRandomRemoteWebDriver(java.net.URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static WebDriver` | `getDriverForPage(java.lang.String url, Configuration conf)`
    `static java.lang.String` | `getHtmlPage(java.lang.String url)`
    `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.

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

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

- - ### Constructor Detail

    - #### HttpWebClient

          public HttpWebClient()

  - ### Method Detail

    - #### getDriverForPage

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

    - #### createFirefoxWebDriver

          public static WebDriver createFirefoxWebDriver(java.lang.String firefoxDriverPath,
                                                         boolean enableHeadlessMode)

    - #### createChromeWebDriver

          public static WebDriver createChromeWebDriver(java.lang.String chromeDriverPath,
                                                        boolean enableHeadlessMode)

    - #### createOperaWebDriver

          public static WebDriver createOperaWebDriver(java.lang.String operaDriverPath,
                                                       boolean enableHeadlessMode)

    - #### createFirefoxRemoteWebDriver

          public static RemoteWebDriver createFirefoxRemoteWebDriver(java.net.URL seleniumHubUrl,
                                                                     boolean enableHeadlessMode)

    - #### createChromeRemoteWebDriver

          public static RemoteWebDriver createChromeRemoteWebDriver(java.net.URL seleniumHubUrl,
                                                                    boolean enableHeadlessMode)

    - #### createRandomRemoteWebDriver

          public static RemoteWebDriver createRandomRemoteWebDriver(java.net.URL seleniumHubUrl,
                                                                    boolean enableHeadlessMode)

    - #### createDefaultRemoteWebDriver

          public static RemoteWebDriver createDefaultRemoteWebDriver(java.net.URL seleniumHubUrl,
                                                                     boolean enableHeadlessMode)

    - #### 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

    - #### getHtmlPage

          public static java.lang.String getHtmlPage(java.lang.String url)

Copyright © 2019 The Apache Software Foundation