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.component |
Modifier and Type | Method and Description |
---|---|
List<ResponseException> |
Document.saveCompleteWebPage(File file)
Saves the document in the specified file and creates a folder in the same directory where associated content (eg., images, js, css, nested frames, etc) is saved, so that the document may be viewed offline;
The name of the content folder is "content_for_FILENAME" where FILENAME is the specified file's name.
|
Modifier and Type | Method and Description |
---|---|
HttpResponse |
UserAgent.download(String url,
File downloadFile)
Downloads and saves the content at the specified url as the specified File, overwriting the file if it already exists; this method does not invoke the parser, and therefore UserAgent.doc is set to an empty Document; UserAgent.response is created to represent the HttpResponse.
|
boolean |
Document.followMetaRedirect(int redirectCount)
Follows the first redirecting meta tag in the document.
|
Document |
UserAgent.open(File file)
Parses the HTML/XHTML/XML within the specified File, and creates UserAgent.doc to represent the Document (which is also returned by this method).
|
Document |
UserAgent.open(File file,
String documentUrl)
Parses the HTML/XHTML/XML within the specified File, and creates UserAgent.doc to represent the Document (which is also returned by this method).
|
Document |
UserAgent.openContent(String content)
Parses the source HTML, XHTML, or XML and creates UserAgent.doc to represent the Document (which is also returned by this method).
|
Document |
UserAgent.openContent(String content,
String documentUrl)
Parses the source HTML, XHTML, or XML and creates UserAgent.doc to represent the Document (which is also returned by this method).
|
Document |
UserAgent.send(HttpRequest httpRequest)
Sends the specified HttpRequest (GET, POST, HEAD, DELETE, or PUT)
|
Document |
UserAgent.sendDELETE(String url)
Sends an HTTP DELETE request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.sendDELETE(String url,
String... additionalHeaders)
Sends an HTTP DELETE request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.sendGET(String url)
Sends an HTTP GET request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.sendGET(String url,
String... additionalHeaders)
Sends an HTTP GET request for the specified url; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
HttpResponse |
UserAgent.sendHEAD(String url)
Sends an HTTP HEAD request to the specified url; UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information), and is also the return value.
|
HttpResponse |
UserAgent.sendHEAD(String url,
String... additionalHeaders)
Sends an HTTP HEAD request to the specified url; UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information), and is also the return value.
|
Document |
UserAgent.sendPOST(String url,
String postData)
Sends an HTTP POST request for the specified url and queryString; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.sendPOST(String url,
String postData,
String... additionalHeaders)
Sends an HTTP POST request for the specified url and queryString; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.sendPUT(String url,
String content)
Sends an HTTP PUT request for the specified url and content; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.sendPUT(String url,
String content,
String... additionalHeaders)
Sends an HTTP PUT request for the specified url and content; UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
Document.submit()
Submits the active form by pressing the submit button, throws a MultipleFound exception if more than one submit button exists in the form.
|
Document |
Document.submit(String buttonLabelRegex)
Submits the active form using the submit button who's text matches the specified (case insensitive) regular expression, using Matcher.matches.
|
Document |
UserAgent.visit(String url)
Directs the UserAgent to visit the specified url (ie, sends an HTTP GET request); UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Document |
UserAgent.visit(String url,
int redirectCount)
Directs the UserAgent to visit the specified url (ie, to send an HTTP GET request); UserAgent.doc is created to represent the retrieved HTML/XML/XHTML Document (which is also returned by this method); UserAgent.response is created to represent the HttpResponse (the response headers and other response-related information).
|
Modifier and Type | Method and Description |
---|---|
Document |
Form.submit()
Submits the the form without pressing any particular submit button; no name-value pair contribution from any submit button is added to the query string.
|
Document |
Form.submit(int submitButtonIndex)
Submits the the form by pressing the submit button specified by its index, with indexing starting at 0 for the first submit button, throwing a NotFound Exception if the specified submitButton is not found.
|
Document |
Form.submit(String valueRx)
Submits the the form by pressing the first submit button who's value (ie, text label) matches the specified (case-insensitive) regular expression (using Matcher.matches) and throws an Exception if the specified submitButton does not exist.
|