resolveRelativeURL

String scrapeableFile.resolveRelativeURL ( String urlToResolve ) (professional and enterprise editions only)

Description

Resolves a relative URL to an absolute URL based on the current URL of this scrapeable file.

Parameters

  • urlToResolve Relative file path, as a string.

Return Values

Returns string containing the complete url to the file. On failure it will return the relative path and an error will be written to the log.

Change Log

Version Description
4.5 Available for professional and enterprise editions.

Examples

Resolve relative URL into an absolute URL

 // Assuming the URL of the current scrapeable file is
 // "https://www.screen-scraper.com/path/to/file/"
 // the method call would result in the URL
 // "https://www.screen-scraper.com/path/to/file/thisfile.php"
 // begin assigned to the "fullURL" variable.

 fullURL = scrapeableFile.resolveRelativeURL( "thisfile.php" );