From c4c89ad0d5cd8154bb617f6293780ad64f972c3a Mon Sep 17 00:00:00 2001 From: pufahrcyp <1195744232@qq.com> Date: Wed, 18 Sep 2024 22:08:30 +0800 Subject: [PATCH] =?UTF-8?q?ADD=20=E5=B7=B4=E9=BB=8E=E5=A5=A5=E8=BF=90?= =?UTF-8?q?=E4=BC=9AAI=E5=BC=B9=E5=B9=95=E5=88=86=E6=9E=90=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.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..a780017 --- /dev/null +++ b/main.py @@ -0,0 +1,13 @@ +from bullet_comments_crawler import fetch_comments +from bullet_comment_analysis import comments_analysis +from word_cloud import generate +#from emotion_analysis import emotion_aly +SEARCH_WORD = "2024巴黎奥运会" +NUM = 300 +if __name__ == '__main__': + fetch_comments(SEARCH_WORD, NUM) # 爬取弹幕 + keywords = ['AI', '人工智能', '智能', 'GPT', '计算', '数据分析', '识别', 'gtp', '合成', '监测'] + comments_analysis(SEARCH_WORD, keywords) # 分析爬取到的弹幕数据 + generate(f'{SEARCH_WORD}统计弹幕.txt') # 根据弹幕统计结果生成词云图 + # emotion_aly(SEARCH_WORD) # 对爬取到的所有弹幕进行情感分析 +