fix: 修复安徽日报出现局部变量t未定义
This commit is contained in:
parent
9bc73843fa
commit
5767dfb591
@ -76,6 +76,7 @@ async def getData(start_date: datetime, end_date: datetime):
|
|||||||
try:
|
try:
|
||||||
async with AsyncClient(headers=headers, timeout=60, http2=False) as client:
|
async with AsyncClient(headers=headers, timeout=60, http2=False) as client:
|
||||||
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), url)
|
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), url)
|
||||||
|
for t in range(5):
|
||||||
try:
|
try:
|
||||||
response = await client.get(url)
|
response = await client.get(url)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user