redhongx

【wordCloudPicture.py】修改数据库连接的相关信息

@@ -9,7 +9,7 @@ def stopWordList(): @@ -9,7 +9,7 @@ def stopWordList():
9 return [line.strip() for line in open('./model/stopWords.txt',encoding='utf8').readlines()] 9 return [line.strip() for line in open('./model/stopWords.txt',encoding='utf8').readlines()]
10 10
11 def get_img(field,tableName,targetImgSrc,resImgSrc): 11 def get_img(field,tableName,targetImgSrc,resImgSrc):
12 - con = connect(host='localhost',user='root',password='root',database='weiboarticles',port=3306,charset='utf8mb4') 12 + con = connect(host='47.92.235.6',user='XiaoXueQi',password='XiaoXueQi',database='Weibo_PublicOpinion_AnalysisSystem',port=3306,charset='utf8mb4')
13 cuser = con.cursor() 13 cuser = con.cursor()
14 sql = f'select {field} from {tableName}' 14 sql = f'select {field} from {tableName}'
15 cuser.execute(sql) 15 cuser.execute(sql)