Package | Description |
---|---|
com.jaunt |
Jaunt [website] is a web-scraping & automation library that provides a lightweight HTTP useragent (headless browser), including JSON parser.
|
com.jaunt.util |
Modifier and Type | Method and Description |
---|---|
UserAgent |
UserAgent.setCacheEnabled(boolean enable)
Turns on/off caching, which causes HTML/XHTML source retrieved by HTTP GET request to be stored in the cache and pulled from that cache for any subsequent GET requests to the same url, as long as caching is enabled; by default, caching is handled by the FileSystemCache, which stores files in a directory called "jaunt_cache", which is in the directory specified by UserAgentSettings.outputPath.
|
Modifier and Type | Method and Description |
---|---|
String |
FileSystemCache.get(String url)
Retrieves and returns the HTML/XML content for the specified url from the cache or returns null if the cache has no content for the specified url.
|
String |
Cache.get(String url)
Retrieves and returns the HTML/XML source content for the specified url from the cache or returns null if the cache has no content for the specified url.
|
void |
FileSystemCache.put(String url,
String content)
Stores the specified HTML/XML content retrieved from the specified url into the cache, or does nothing if the specified content is null.
|
void |
Cache.put(String url,
String content)
Stores the specified HTML/XML source content retrieved from the specified url into the cache, or does nothing if the specified content is null.
|
Constructor and Description |
---|
FileSystemCache(File directory)
Creates a new FileSystemCache using the specified directory as the location for cache files and creates the specified directory (including any necessary parent directories) if it does not already exist
|