def getComments(self, videoId, limit=20): comments = [] ans, temp_comments = infoDBserver.get_commentByVideoId(videoId) if ans and temp_comments!=None: for element in temp_comments: comment = transclass.comment_trans(element) comments.append(comment) return comments
def getComments2(id): comments = [] ans, temp_comments = infoDBserver.get_commentByVideoId(id) if ans and temp_comments!=None: for element in temp_comments: comment = transclass.comment_trans(element) comments.append(comment) return ans, comments