Giter VIP home page Giter VIP logo

Comments (8)

soodoku avatar soodoku commented on September 4, 2024 2

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.

soodoku avatar soodoku commented on September 4, 2024 1

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.

soodoku avatar soodoku commented on September 4, 2024 1

thanks! will investigate that too!

from tuber.

soodoku avatar soodoku commented on September 4, 2024 1

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.

Lucinho91 avatar Lucinho91 commented on September 4, 2024 1

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.

Lucinho91 avatar Lucinho91 commented on September 4, 2024

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.

Lucinho91 avatar Lucinho91 commented on September 4, 2024

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.

soodoku avatar soodoku commented on September 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.