scrapeableFile

Scrapeable File

setMaxResponseLength

void scrapeableFile.setMaxResponseLength ( int maxKBytes ) (professional and enterprise editions only)

Description

Limit the amount of information retrieved by the scrapeable file. This method can be useful in cases of very large responses where the desired information is found in the first portion of the response. It can also help to make the scraping process more efficient by only downloading the needed information.

setCharacterSet

void scrapeableFile.setCharacterSet ( String characterSet ) (professional and enterprise editions only)

Description

Set the character set used in a specific scrapeable file's response renderings. This can be particularly helpful when the page renders characters incorrectly.

addHTTPHeader

void scrapeableFile.addHTTPHeader ( String key, String value ) (professional and enterprise editions only)

Description

Add an HTTP header to be sent along with the request.

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.

setForceMultiPart

void scrapeableFile.setForceMultiPart ( boolean forceMultiPart ) (professional and enterprise editions only)

Description

Set content type header to multipart/form-data.

getName

String scrapeableFile.getName ( )

Description

Get the name of the scrapeable file.

Parameters

This method does not receive any parameters.

Return Values

Returns the name of the scrapeable file, as a string.

setRetainNonTidiedHTML

void scrapeableFile.setRetainNonTidiedHTML ( boolean retainNonTidiedHTML ) (enterprise edition only)

Description

Set whether or not non-tidied HTML is to be retained for the current scrapeable file.

getRetainNonTidiedHTML

boolean scrapeableFile.getRetainNonTidiedHTML ( ) (enterprise edition only)

Description

Determine if the scrapeable file is set to retain non-tidied html.

Parameters

This method does not receive any parameters.

Return Values

Returns boolean flag for non-tidied contents being retained.

scrapeableFile

Overview

The scrapeableFile object refers to the current file being requested from a given server. It houses both the request for a file and response and can be manipulated to meet any necessary requirements: GET and POST parameters, referer information, cookies, FILE parameters, HTTP headers, characterset, and such.

setUserAgent

void scrapeableFile.setUserAgent ( String userAgent ) (professional and enterprise editions only)

Description

Explicitly state the user agent making the request.