session

session

session Methods

stopScraping

session.stopScraping()
Description
When invoked, screen-scraper will halt the current scraping session.
Example
// Stops scraping if an error response was received

setNumRecordsScraped

session.setNumRecordsScraped( Object value ) (enterprise edition only)
Description
Sets the number of records that have currently been scraped. This method is used in conjunction with record thresholds in the Enterprise edition.

setFatalErrorOccurred

session.setFatalErrorOccurred( boolean fatalErrorOccurred ) (enterprise edition only)
Description
Indicates that a fatal error occurred while the scraping session was running.

setErrorMessage

session.setErrorMessage( String errorMessage ) (enterprise edition only)
Description
Sets an error message. The error message will be displayed in the web interface.

setCookie

session.setCookie( String domain, String key, String value ) (professional and enterprise editions only)
Description
Causes a cookie to be manually set on the current session state.

sendDataToClient

session.sendDataToClient( String key, Object value ) (enterprise edition only)
Description
When screen-scraper is invoked from an external application, this causes data to be sent back to the client while the scraping session is still in process.

sendMail

session.sendMail( String subject, String body, String recipients, String attachments, String headers ) (enterprise edition only)
Description
Sends an email using the given subject and body to the given comma-se

scrapeFile

session.scrapeFile( String scrapeableFileIdentifier )
Description
Causes the scrapeable file identified by scrapeableFileIdentifier to be scraped.
Example

setVariable

session.setVariable( String identifier, Object value )
Description
Designates that value should be saved for the duration of the session, and can be accessed using the getVariable method using identifier.

Syndicate content