Object runnableScrapingSession.getVariable ( String variableName ) (professional and enterprise editions only)


Retrieve the the value of a session variable. This method should be called after scrape method has returned.


  • variableName Name of the variable, as a string.

Return Values

Returns the value of the session variable: object, boolean, int, string, etc. If the variable doesn't exists it returns null.

Change Log

Version Description
4.5 Available for professional and enterprise editions.


Write Variable to Log

 runnableScrapingSession = new com.screenscraper.scraper.RunnableScrapingSession( "My Session" );

 // Ensure scrape will be run before the script continues
 runnableScrapingSession.setDoLazyScrape( false );

 // Start the scrape

 // Outputs the value of the variable FOO to the log.
 session.log( "FOO: " + runnableScrapingSession.getVariable( "FOO" ) );

See Also

  • setVariable() [RunnableScrapingSession] - Sets a variable for the scraping session