juanboy

舆情函数调通

... ... @@ -43,7 +43,8 @@ def topicdefine():
return label_article,label_comments
# 更新数据库
def update_data(label_article,label_comments):
def update_data():
label_article,label_comments=topicdefine()
add_label_comments()
add_label_article()
for row in label_article:
... ... @@ -57,7 +58,9 @@ def update_data(label_article,label_comments):
params = [str(label),str(id)]
query(sql, params)
# x,y=topicdefine()
# update_data(x,y)
drop_label()
drop_label1()
\ No newline at end of file
if __name__ == '__main__':
update_data()
#删除文章和评论的标签列
# drop_label()
# drop_label1()
\ No newline at end of file
... ...
... ... @@ -41,4 +41,3 @@ def clean(text):
if __name__ == '__main__':
writer_comments_cuts()
\ No newline at end of file
# print(clean("想到一次我也看到了这样的,我把我的外套(喷了淡茉莉香水的)递过去了,我当时觉得她可能是因为地铁空调有点冷一直环抱着,我借给她说冷的话可以披一下,我坐到终点站的,然后她说不用了,我好尴尬哇"))
\ No newline at end of file
... ...