getNonTidiedHTML
String scrapeableFile.getNonTidiedHTML ( ) (enterprise edition only)
Description
Retrieve the non-tidied HTML of the scrapeable file.
Parameters
This method does not receive any parameters.
Return Values
Returns the non-tidied contents of the scrapeable file, as a string. On failure it returns null.
Change Log
Version | Description |
---|---|
4.5 | Available for enterprise edition. |
By default non-tidied html is not retained. For this method to return anything other than null you must use setRetainNonTidiedHTML to force non-tidied html to be retained.
Examples
Write Untidied HTML to Log if Retained
// Outputs the non-tidied HTML from the scrapeable file
// to the log based on whether it was retained or not.
if (scrapeableFile.getRetainNonTidiedHTML())
{
session.log( "Non-tidied HTML: " + scrapeableFile.getNonTidiedHTML() );
}
else
{
session.log( "The non-tidied HTML was not retained or the file has not yet been scraped." );
}
// to the log based on whether it was retained or not.
if (scrapeableFile.getRetainNonTidiedHTML())
{
session.log( "Non-tidied HTML: " + scrapeableFile.getNonTidiedHTML() );
}
else
{
session.log( "The non-tidied HTML was not retained or the file has not yet been scraped." );
}
See Also
- setRetainNonTidiedHTML() [scrapeableFile] - Retain non-tidied HTML for a scrapeable file.
- getRetainNonTidiedHTML() [scrapeableFile] - Determine if non-tidied HTML is being retained by the scrapeable file.
- getRetainNonTidiedHTML() [session] - Determine if non-tidied HTML is to be retained for all scrapeable files.
- setRetainNonTidiedHTML() [session] - Retain non-tidied HTML for all scrapeable files.
scraper on 07/16/2010 at 4:55 pm
- Printer-friendly version
- Login or register to post comments