Opens a Chrome with a throwaway profile on the host, lets any browser
check run, and keeps it open, for read_page() and fetch() to use
through their session argument. Close it with close(); a session that
is not closed lives until the R session ends. Should the browser go away
meanwhile – its window closed, say – the next read or download opens
another, the same way, and says so.
Arguments
- url
A URL on the host. The browser is opened on the host's root.
headedanduseragenthold for the session's life, through any reopening of its browser.- quiet
Suppress progress messages.
- wait
Seconds to wait for the check to pass. The default is two minutes when a window is shown, so that a person can click a box if one appears, and thirty seconds headless.
- headed
How to run the browser, when one is needed:
"auto", the default, tries headless Chrome first and opens a window only when the headless run does not get through, so that a window is shown only when someone may need to click;TRUEopens a window at once andFALSEnever does. Without a display"auto"is headless. A host may run a second check at the file's URL, after the one at its root; headless Chrome has passed such a check with nothing clicked, but only after about two minutes, where a window shows a box that gets it through as soon as it is clicked."auto"waits those minutes and opens a window if they pass without;TRUEskips the wait.- useragent
The user-agent string the browser announces. Headless Chrome's own calls it
HeadlessChrome, and some hosts refuse it on that word alone.TRUE, the default, drops the word, so that the string says the Chrome version and platform it is and nothing it is not;NULLleaves Chrome's own string; a string is used as given. Set before the browser's first request, and whatclearance()then reports.
Value
An object of class safeconduct_session. Its clearance is what
clearance() would return. Errors as fetch() does.
