Read html with a crawl delay set with the sleep_time
argument. In addition, if the initial response returns NULL, the url is read again. A NULL will be returned if the second try also results in an error. All connections are closed before the response is returned.
1 2 3 4 5 6 7 8 |
x |
A string, a connection, or a raw vector. A string can be either a path, a url or literal xml. Urls will
be converted into connections either using If a connection, the complete connection is read into a raw vector before being parsed. |
encoding |
Specify a default encoding for the document. Unless otherwise specified XML documents are assumed to be in UTF-8 or UTF-16. If the document is not UTF-8/16, and lacks an explicit encoding directive, this allows you to supply a default. |
... |
Additional arguments passed on to methods. |
options |
Set parsing options for the libxml2 parser. Zero or more of
|
sleep_time |
Time in seconds for the system to sleep before each scrape with |
verbose |
When reading from a slow connection, this prints some output on every iteration so you know its working. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.