From 6796f9afab7c83af7902ffa4e2a434b0d056762e Mon Sep 17 00:00:00 2001 From: pufahrcyp <1195744232@qq.com> Date: Wed, 18 Sep 2024 22:08:50 +0800 Subject: [PATCH] =?UTF-8?q?ADD=20=E9=99=84=E5=8A=A0=E9=A2=98=E4=B8=BB?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main_addtion.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main_addtion.py 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