tuber icon indicating copy to clipboard operation
tuber copied to clipboard

Error message for `get_all_comments()` for videos without comments

Open balthasars opened this issue 4 years ago • 3 comments

Running get_all_comments() on videos that have received no comments throws this somewhat uninformative error:

get_all_comments("0ZyfSKT2ARk")
Error in `$<-.data.frame`(`*tmp*`, "parentId", value = NA) : 
  replacement has 1 row, data has 0
Called from: `$<-.data.frame`(`*tmp*`, "parentId", value = NA)

also happens here

get_all_comments("n2PRxx7xpao")
Error in `$<-.data.frame`(`*tmp*`, "parentId", value = NA) : 
  replacement has 1 row, data has 0
Called from: `$<-.data.frame`(`*tmp*`, "parentId", value = NA)

I'd suggest a message like "No comments available".

balthasars avatar Apr 13 '21 17:04 balthasars

Thanks for this @balthasars --- I will take a look at this function later this week. As always, feel free to PR wherever you see a quick opportunity as time allows. Your contributions are much appreciated!

soodoku avatar Apr 13 '21 17:04 soodoku

Thanks for this @balthasars --- I will take a look at this function later this week. As always, feel free to PR wherever you see a quick opportunity as time allows. Your contributions are much appreciated!

Thank you for your very swift reply 👍🏼
Your work is also much appreciated on my side! This one seems pretty low priority to be honest, just wanted to document it, tbh.

balthasars avatar Apr 13 '21 18:04 balthasars

@balthasars how did you solve this problem in your code so the videos without comments are ignored?

beatrizvalfranco avatar Aug 30 '21 16:08 beatrizvalfranco