| set_scholar_cookie | R Documentation |
set the Scholar session
set_scholar_cookie(cookie = NULL, file = NULL)
cookie |
a |
file |
path to a cookie file exported from a browser, either in the
Netscape format used by |
Supply the session that lets Google Scholar treat this R session like the browser you are already signed in with. Some endpoints, author search among them, answer an anonymous request with a Google sign-in page while showing data in a browser; the difference is the cookie.
Google's own cookies are HttpOnly, so a browser will not
reveal them to a script or a copy button: take them from the developer
tools under Application, or with an extension that exports a cookie file.
Published lifetimes are six months for NID and thirteen for
_Secure-ENID and SOCS, counted from last use, and Google
ends a session sooner when it looks automated, so expect to export it
again. On a server or in CI, where there is no browser to copy from, set
the SCHOLAR_COOKIE_FILE environment variable rather than passing
the value here: a session is a credential, and an option or an argument
lands in the command history. The session is sent only to a Google host,
so a mirror set with set_scholar_mirror never receives it.
NULL, invisibly; the values are stored as options
Guangchuang Yu
## Not run:
set_scholar_cookie(cookie = "NID=abc123; GSP=XQwERT")
set_scholar_cookie(file = "~/scholar-cookies.txt")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.