org.apache.nutch.protocol.selenium

## Class HttpWebClient

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

-     public class HttpWebClient
      extends 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(URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static WebDriver` | `createChromeWebDriver(String chromeDriverPath, boolean enableHeadlessMode)`
    `static RemoteWebDriver` | `createDefaultRemoteWebDriver(URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static RemoteWebDriver` | `createFirefoxRemoteWebDriver(URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static WebDriver` | `createFirefoxWebDriver(String firefoxDriverPath, boolean enableHeadlessMode)`
    `static WebDriver` | `createOperaWebDriver(String operaDriverPath, boolean enableHeadlessMode)`
    `static RemoteWebDriver` | `createRandomRemoteWebDriver(URL seleniumHubUrl, boolean enableHeadlessMode)`
    `static WebDriver` | `getDriverForPage(String url, Configuration conf)`
    `static String` | `getHtmlPage(String url)`
    `static String` | `getHtmlPage(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(String url,
                                                   Configuration conf)

    - #### createFirefoxWebDriver

          public static WebDriver createFirefoxWebDriver(String firefoxDriverPath,
                                                         boolean enableHeadlessMode)

    - #### createChromeWebDriver

          public static WebDriver createChromeWebDriver(String chromeDriverPath,
                                                        boolean enableHeadlessMode)

    - #### createOperaWebDriver

          public static WebDriver createOperaWebDriver(String operaDriverPath,
                                                       boolean enableHeadlessMode)

    - #### createFirefoxRemoteWebDriver

          public static RemoteWebDriver createFirefoxRemoteWebDriver(URL seleniumHubUrl,
                                                                     boolean enableHeadlessMode)

    - #### createChromeRemoteWebDriver

          public static RemoteWebDriver createChromeRemoteWebDriver(URL seleniumHubUrl,
                                                                    boolean enableHeadlessMode)

    - #### createRandomRemoteWebDriver

          public static RemoteWebDriver createRandomRemoteWebDriver(URL seleniumHubUrl,
                                                                    boolean enableHeadlessMode)

    - #### createDefaultRemoteWebDriver

          public static RemoteWebDriver createDefaultRemoteWebDriver(URL seleniumHubUrl,
                                                                     boolean enableHeadlessMode)

    - #### cleanUpDriver

          public static void cleanUpDriver(WebDriver driver)

    - #### getHtmlPage

          public static String getHtmlPage(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 String getHtmlPage(String url)

Copyright © 2020 The Apache Software Foundation