scholar
scholar copied to clipboard
get_complete_authors returns NA
Hello - when I use get_complete_authors it returns NA for the author column (even when I try and just do one article). In running the function on its own, I am wondering if the issue is in get_author (nested within get_complete_author)? I am getting a 404 error with the current URL formatting, it looks like google may have changed their formatting?
Here is the code I am using: id = "g5LA4-oAAAAJ&hl=en" pubs <- scholar::get_publications(id=id, pagesize=n)
df <-pubs %>% rowwise() %>% dplyr::mutate( author = case_when( str_ends(author, "\.\.\.") ~ scholar::get_complete_authors(id = id, pubid = pubid, delay= 1), TRUE ~ author ))
Hello - when I use get_complete_authors it returns NA for the author column (even when I try and just do one article). In running the function on its own, I am wondering if the issue is in get_author (nested within get_complete_author)? I am getting a 404 error with the current URL formatting, it looks like google may have changed their formatting?
Here is the code I am using: id = "g5LA4-oAAAAJ&hl=en" pubs <- scholar::get_publications(id=id, pagesize=n)
df <-pubs %>% rowwise() %>% dplyr::mutate( author = case_when( str_ends(author, "...") ~ scholar::get_complete_authors(id = id, pubid = pubid, delay= 1), TRUE ~ author ))
Hey first of all, thanks for your codes! You should use double back slashes (\\
) to escape .
in R string format. After changing this, your code works for me.
However, I do get "Google is rate limiting you for making too many requests too quickly." still when I try to get_complete_authors
for a large data frame.
df <- pubs %>%
rowwise() %>%
dplyr::mutate(
author = case_when(
str_ends(author, "\\.\\.\\.") ~ scholar::get_complete_authors(id = id, pubid = pubid, delay= 3),
TRUE ~ author))
Hope this helps.