Przeglądaj źródła

上传读取标题功能

罗俊辉 1 rok temu
rodzic
commit
66696132de
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      process_data.py

+ 1 - 1
process_data.py

@@ -74,7 +74,7 @@ class DataProcessor(object):
         """
         sql = f"""SELECT title from wx_video where id = {video_id};"""
         try:
-            title = self.client.select(sql)
+            title = self.client.select(sql)[0][0]
             keywords_textrank = jieba.analyse.textrank(title, topK=3)
             return list(keywords_textrank)
         except Exception as e: