nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris A. Mattmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NUTCH-2021) Use protocol-selenium to Capture Screenshots of the Page as it is Fetched
Date Thu, 28 May 2015 14:59:17 GMT

    [ https://issues.apache.org/jira/browse/NUTCH-2021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14563028#comment-14563028
] 

Chris A. Mattmann commented on NUTCH-2021:
------------------------------------------

+1 for the patch as-is.

Suggested improvement later on:
  * store the data in Hadoop HDFS, maybe in the segments dir under a new folder?
  * provide a default value for the screenshot dir path and/or check in the code if it's null
and don't use it if it's not set.

> Use protocol-selenium to Capture Screenshots of the Page as it is Fetched
> -------------------------------------------------------------------------
>
>                 Key: NUTCH-2021
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2021
>             Project: Nutch
>          Issue Type: New Feature
>          Components: plugin, protocol
>    Affects Versions: 1.10
>            Reporter: Lewis John McGibbney
>            Assignee: Lewis John McGibbney
>             Fix For: 1.11
>
>         Attachments: NUTCH-2021.patch, NUTCH-2021.patch, NUTCH-2021v2.patch, speakers-bureau.php.png
>
>
> This should be a piece of cake. It can be done as follows
> {code}
> WebDriver driver = new FirefoxDriver();
> driver.get("http://www.google.com/");
> File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
> // Now you can do whatever you need to do with it, for example copy somewhere
> FileUtils.copyFile(scrFile, new File("/usr/local/pics/screenshot.png"));
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message