fix: 修复中国环境报,中国教育报采集日期报错问题
This commit is contained in:
parent
544650bb77
commit
13c7a3f419
@ -67,6 +67,7 @@ async def getData(start_date: datetime, end_date: datetime):
|
|||||||
months = []
|
months = []
|
||||||
# 从开始日期到结束日期,每个月份都添加到列表中
|
# 从开始日期到结束日期,每个月份都添加到列表中
|
||||||
current_date = start_date
|
current_date = start_date
|
||||||
|
current_date = current_date.replace(day=1)
|
||||||
while current_date <= end_date:
|
while current_date <= end_date:
|
||||||
months.append(current_date)
|
months.append(current_date)
|
||||||
# 增加一个月
|
# 增加一个月
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user