playlist_bot.py
def has_video_content(submission):
    """ Return boolean based on whether submission is viable to have a youtube playlist made """

    all_comments = submission.comments
    # imported from praw.helpers
    flat_comments = flatten_tree(all_comments)

    video_count = 0

    for comment in flat_comments:
        if type(comment) != MoreComments and comment.score >= MINIMUM_COMMENT_UPVOTES:
            links_in_comment = YOUTUBE_REGEX.findall(comment.body)
            if links_in_comment:
                video_count = video_count + len(links_in_comment)
        if video_count >= MINIMUM_PLAYLIST_SIZE:
            return True
    return False
 Return boolean based on whether submission is viable to have a youtube playlist made 
Return boolean based on whether submission is viable to have a youtube playlist made
Return boolean based on whether submission is viable to have a youtube playlist made
def has_video_content(submission):
    all_comments = submission.comments
    flat_comments = flatten_tree(all_comments)
    video_count = 0
    for comment in flat_comments:
        if type(comment) != MoreComments and comment.score >= MINIMUM_COMMENT_UPVOTES:
            links_in_comment = YOUTUBE_REGEX.findall(comment.body)
            if links_in_comment:
                video_count = video_count + len(links_in_comment)
        if video_count >= MINIMUM_PLAYLIST_SIZE:
            return True
    return False
def has_video_content ( submission ) : all_comments = submission . comments flat_comments = flatten_tree ( all_comments ) video_count = 0 for comment in flat_comments : if type ( comment ) != MoreComments and comment . score >= MINIMUM_COMMENT_UPVOTES : links_in_comment = YOUTUBE_REGEX . findall ( comment . body ) if links_in_comment : video_count = video_count + len ( links_in_comment ) if video_count >= MINIMUM_PLAYLIST_SIZE : return True return False
Return boolean based on whether submission is viable to have a youtube playlist made
Return boolean based on whether submission is viable to have a youtube playlist made
""" Return boolean based on whether submission is viable to have a youtube playlist made """ # imported from praw.helpers
submission