Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_complete_authors returns NA #117

Open
genoa-sullaway opened this issue Sep 12, 2022 · 1 comment
Open

get_complete_authors returns NA #117

genoa-sullaway opened this issue Sep 12, 2022 · 1 comment

Comments

@genoa-sullaway
Copy link

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
))

@jxshen311
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants