Skip to content

Commit

Permalink
Update popularity.py
Browse files Browse the repository at this point in the history
  • Loading branch information
qqhsx authored May 25, 2024
1 parent d353fea commit 93077c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions popularity.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os
import pywencai

# 定义变量
query = '退市股票'
filename = f'{query}.csv'
# 从环境变量读取查询词
query = os.getenv('CSV_FILE_NAME ', '退市股票') # 如果环境变量不存在,则使用默认值 '退市股票'
filename = f'{CSV_FILE_NAME }.csv'

# 使用变量进行查询和保存结果
res = pywencai.get(question=query, loop=True)
Expand Down

0 comments on commit 93077c5

Please sign in to comment.