session
 |
session Methods |
| session.stopScraping() |
| Description |
| When invoked, screen-scraper will halt the current scraping session. |
 |
| Example |
// Stops scraping if an error response was received
| 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.
| session.setFatalErrorOccurred( boolean fatalErrorOccurred ) (enterprise edition only) |
| Description |
Indicates that a fatal error occurred while the scraping session was running.
| session.setErrorMessage( String errorMessage ) (enterprise edition only) |
| Description |
Sets an error message. The error message will be displayed in the web interface.
| 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.
| 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.
| 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
| session.scrapeFile( String scrapeableFileIdentifier ) |
| Description |
| Causes the scrapeable file identified by scrapeableFileIdentifier to be scraped. |
 |
| Example |
| 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.
|
| | | | | | | | | | | | | | | | | |
Recent comments
1 day 19 hours ago
1 day 19 hours ago
1 day 19 hours ago
4 days 19 hours ago
4 days 19 hours ago
5 days 1 hour ago
5 days 19 hours ago
5 days 19 hours ago
6 days 13 min ago
6 days 20 hours ago