This function collects public comments data for one or more YouTube videos using the YouTube Data API v3
and structures the data into a dataframe with the class names "datasource"
and "youtube"
.
YouTube has a quota unit system as a rate limit with most developers having either 10,000 or 1,000,000 units per
day. Many read operations cost a base of 1 unit such as retrieving individual comments, plus 1 or 2 units for text
snippets. Retrieving threads or top-level comments with text costs 3 units per request (maximum 100 comments per
request). Using this function a video with 250 top-level comments and 10 of those having reply comments of up to
100 each, should cost (9 + 20) 29 quota units and return between 260 and 1260 total comments. There is currently a
limit of 100 reply comments collected per top-level comment.
More information about the YouTube Data API v3 can be found here:
https://developers.google.com/youtube/v3/getting-started