I'm interested in scraping titles of journals from Web of Knowledge using R
and rvest
. However, I'm having problems submitting the proper form. I'm interested in a list of all Econometrica articles from 1960-1970. I'm automatically logged in using access from my local university library.
When I run
library("rvest")
library("httr")
link = "http://isiknowledge.com/wos"
form = html_session(link) %>% html_form() # returns list of 6 forms
form[[4]] = set_values(form[[4]], # set values in form number 4
product = "WOS",
range = "ALL",
action = "search",
period = "Range Selection",
startYear = "1960",
endYear = "1970",
range = "ALL",
'value(select1)' = "SO",
'value(input1)' = "econometrica",
formUpdated = "TRUE")
submit_form(html_session(link), form = form)
I have two problems: First, it submits with ''
and not "Econometrica", and second, I receive the following error message: Error in if (!(submit %in% names(submits))) { : argument is of length zero
.
There's a Python alternative here but the code has to be in R. Any help on how to make progress would be much appreciated.