session

Scraping Session

loadVariables

void session.loadVariables ( String fileToReadFrom ) (enterprise edition only)

Description

Load session variables from a file.

getVariable

Object session.getVariable ( String identifier )

Description

Retrieve the value of a saved session variable.

getRetainNonTidiedHTML

boolean session.getRetainNonTidiedHTML ( ) (enterprise edition only)

Description

Determine whether or not non-tidied HTML is to be retained for all scrapeable files in this scraping session.

Parameters

This method does not receive any parameters.

Return Values

Returns whether non-tidied HTML is be retained for all scrapeable files or not, as a boolean.

getNumRecordsScraped

int session.getNumRecordsScraped ( ) (enterprise edition only)

Description

Get the number of records that have been scraped.

Parameters

This method does not receive any parameters.

Return Values

Returns number of records scraped, as a integer.

getName

String session.getName ( )

Description

Get the name of the current scraping session.

Parameters

This method does not receive any parameters.

Return Values

Returns the name of the scraping session, as a string.

getLogFileName

String session.getLogFileName ( ) (professional and enterprise editions only)

Description

Get the name of the current log file.

Parameters

This method does not receive any parameters.

Return Values

Returns the name of the log file, as a string.

getFatalErrorOccurred

boolean session.getFatalErrorOccurred ( ) (enterprise edition only)

Description

Determine the fatal error status of the scrape.

Parameters

This method does not receive any parameters.

Return Values

Returns whether a fatal error has occurred, as a boolean .

getErrorMessage

String session.getErrorMessage ( ) (enterprise edition only)

Description

Get the current error message.

Parameters

This method does not receive any parameters.

Return Values

Returns current error message, as a string.

getElapsedRunningTime

long session.getElapsedRunningTime ( ) (professional and enterprise editions only)

Description

Get how long the current session has been running.

Parameters

This method does not receive any parameters.

Return Values

Returns number of milliseconds the scrape has been running, as a long (8-byte integer).

executeScript

void session.executeScript ( String scriptName ) (professional and enterprise editions only)

Description

Manual start the execution of a script.