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

list_channel_resources omits [[items]][[1]][["id"]] for some usernames #67

Open
j1wonkim opened this issue Mar 19, 2019 · 1 comment
Open
Assignees
Labels

Comments

@j1wonkim
Copy link

j1wonkim commented Mar 19, 2019

Hi, I am having a problem with the list_channel_resources function with the username filter. I am interested in giving username and getting channel id. The code is generating the desired result for some usernames but not others. For some usernames, tuber will return incomplete results (omit channel id). It does not seem that there is something wrong about the specific usernames I am giving, however. When I run the corresponding function of list_channel_resources with the youtube provided python code (https://google-developers.appspot.com/youtube/v3/code_samples/code_snippet_instructions#toggle-code-snippets-and-full-samples), I get results without NA values.

Following code is what I tried with Tuber, and the csv file is attached below. So the tuber command works for userids$userid[1] but not for userids$userid[2] or userids$userid[3] (userids$userid[2] worked once but not for 20+ other attempts). By not working, I mean, they give empty list for [items] in tmp, unlike userids$userid[1]'s result giving [[1]] that consists of [kind], [etag], and [id]. Both of them works in python code and gives me channel ids.
Username.zip

userids<-read.csv('clean_user_id.csv')
user_channelid<-list()
#loop
for(i in 1:69){
k=userids$userid[i]
tmp<-list_channel_resources(filter=c(username=k), part="id")
user_channelid[i]<-tmp[["items"]][[1]][["id"]]
print(i)
}

#individual
k=userids$userid[3]
k
tmp<-list_channel_resources(filter=c(username=k), part="id")
"list_channel_resources"
tmp[["items"]][[1]][["id"]]

Created on 2019-03-19 by the reprex package (v0.2.1)

@soodoku soodoku self-assigned this Jun 20, 2019
@soodoku soodoku added the bug label Jun 20, 2019
@soodoku
Copy link
Member

soodoku commented Jun 29, 2019

A reproducible example, say with a list of userids for which you are not getting the results, @j1wonkim, would help a lot.

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

No branches or pull requests

2 participants