diff --git a/main_addtion.py b/main_addtion.py new file mode 100644 index 0000000..950b56f --- /dev/null +++ b/main_addtion.py @@ -0,0 +1,9 @@ +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) # 对爬取到的弹幕进行情感分析 \ No newline at end of file