Comments (8)
I will look at this very soon. We should be able to resolve the bug. I have just been doing lazy coding. Will clean up.
from tuber.
Hey, this looks like a bug. I will investigate.
And I will share an example of how to get comments from multiple videos in one go.
from tuber.
thanks! will investigate that too!
from tuber.
hey @Lucinho91, I have addressed the first issue. It was there because one of the comments had an extra column called 'ModerationStatus'. I now return that column and id by default. For duplicates, we would want to deduplicate by id. Can you give me a working example where duplicates are returned?
The function is still not final --- I think it can be coded better. But I want to get it work correctly first. So when you get a chance, please send an example of a case where duplicates are returned.
q <- get_all_comments(video_id="zdnybX_qWxY")
nrow(q)
### [1] 6
from tuber.
Hey just another question: I committed a stupid mistake. I already downloaded around 16000 comments from different videos for my master thesis and somehow I didn't store them correctly. Now due to the changes and the new error I cannot download a single comment anymore. Will you get that error fixed? That would be so nice, I really need those comments. I am a little desperate right now :( :D
from tuber.
Hey soodoku, thank you so much for your quick answer! :) amazing, I cannot wait for your answer and I am really looking forward to hearing from you.
In addition, I also found another issue with the function. Often times, it returned the same comment multiple times, even though in the youtube comment section the comment was only posted once.
Therefore I had to apply the "unique" function in order to avoid duplicate rows in the data frame.
I hope this can serve you as a bug report or feedback in general as well.
Best regards from Germany
from tuber.
Hey @soodoku thank you for your quick answer and fix. However, now after downloading the updated version of tuber I receive a new error which I didn't get before.
error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 99, 100
Do you know how to solve this issue? It now appears with almost every video that I tested.
Now to the problem concerning duplicate rows: this video ID gave me duplicate rows before you updated the package (now the error above wouldn't let me extract the comments anymore)
duplicaterows <- get_all_comments(video_id="XpaOjMXyJGk")
If you filter by author display name you should see that several times the same author with the same comment is included in the data frame.
Thank you a lot for your help and I hope you can solve the new error that I described above.
Best regards
from tuber.
Hey @Lucinho91,
fixed the issue + duplication
ans <- get_all_comments(video_id="XpaOjMXyJGk")
nrow(ans)
# [1] 11317
length(unique(ans$id))
# [1] 11317
your other question was about how to get comments from multiple videos in one go. Just use lapply and then you can ldply rbind the list elements:
ans <- lapply(list("zdnybX_qWxY", "zdnybX_qWxY"), get_all_comments)
ldply(ans, rbind)
from tuber.
Related Issues (20)
- Unable to read token from:.httr-oauth HOT 5
- get_all_channel_video_stats() fails because of seq_len()
- get_comment_threads repeats 100 most recent comments HOT 2
- Feature request: Output of `get_video_details()` as data frame HOT 6
- Use of comments for research
- Error in if (n_replies[i] == 1) { : missing value where TRUE/FALSE needed HOT 1
- Error message for `get_all_comments()` for videos without comments HOT 3
- Quota management HOT 2
- cannot get_all_channel_video_stats for some channels HOT 4
- Add API key authentication HOT 4
- 404 error trying to get videos from YT autogenerated channel HOT 1
- Authentication Error HOT 2
- Unnable to auth
- Addition of mine=TRUE to get_channel_stats gives an error HOT 1
- Breaking change in `get_playlist_items()`
- There is no "region" parameter for "yt_search" function HOT 4
- Pagination error in get_playlist_items
- 'get_playlist_items' pagination not passing arguments to tuber_GET
- list_channel_videos() returning only the latest 20,000 videos HOT 1
- Error 403 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuber.