from bullet_comments_crawler import fetch_comments from word_cloud import generate from emotion_analysis import emotion_aly SEARCH_WORD = "孙颖莎" NUM = 300 if __name__ == '__main__': fetch_comments(SEARCH_WORD, NUM) # 以 SEARCH_WORD 为搜索关键词爬取 NUM 个视频的弹幕 generate(f'{SEARCH_WORD}弹幕.txt') # 根据爬取到的弹幕生成词云图 emotion_aly(SEARCH_WORD) # 对爬取到的弹幕进行情感分析