Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -151,7 +151,7 @@ def query_financial_data(company_name, query_type):
|
|
| 151 |
}
|
| 152 |
},
|
| 153 |
headers=HEADERS,
|
| 154 |
-
timeout=
|
| 155 |
)
|
| 156 |
|
| 157 |
if search_resp.status_code != 200:
|
|
@@ -194,7 +194,7 @@ def query_financial_data(company_name, query_type):
|
|
| 194 |
}
|
| 195 |
},
|
| 196 |
headers=HEADERS,
|
| 197 |
-
timeout=
|
| 198 |
)
|
| 199 |
|
| 200 |
if data_resp.status_code != 200:
|
|
@@ -240,7 +240,7 @@ def query_financial_data(company_name, query_type):
|
|
| 240 |
}
|
| 241 |
},
|
| 242 |
headers=HEADERS,
|
| 243 |
-
timeout=
|
| 244 |
)
|
| 245 |
|
| 246 |
if metrics_resp.status_code != 200:
|
|
@@ -322,7 +322,7 @@ def query_financial_data(company_name, query_type):
|
|
| 322 |
}
|
| 323 |
},
|
| 324 |
headers=HEADERS,
|
| 325 |
-
timeout=
|
| 326 |
)
|
| 327 |
|
| 328 |
if metrics_resp.status_code != 200:
|
|
@@ -404,7 +404,7 @@ def query_financial_data(company_name, query_type):
|
|
| 404 |
}
|
| 405 |
},
|
| 406 |
headers=HEADERS,
|
| 407 |
-
timeout=
|
| 408 |
)
|
| 409 |
|
| 410 |
if filings_resp.status_code != 200:
|
|
|
|
| 151 |
}
|
| 152 |
},
|
| 153 |
headers=HEADERS,
|
| 154 |
+
timeout=60 # 增加到60秒
|
| 155 |
)
|
| 156 |
|
| 157 |
if search_resp.status_code != 200:
|
|
|
|
| 194 |
}
|
| 195 |
},
|
| 196 |
headers=HEADERS,
|
| 197 |
+
timeout=60 # 增加到60秒
|
| 198 |
)
|
| 199 |
|
| 200 |
if data_resp.status_code != 200:
|
|
|
|
| 240 |
}
|
| 241 |
},
|
| 242 |
headers=HEADERS,
|
| 243 |
+
timeout=120 # 3年趋势需要更长时间,增加到120秒
|
| 244 |
)
|
| 245 |
|
| 246 |
if metrics_resp.status_code != 200:
|
|
|
|
| 322 |
}
|
| 323 |
},
|
| 324 |
headers=HEADERS,
|
| 325 |
+
timeout=180 # 5年趋势需要更长时间,增加到180秒
|
| 326 |
)
|
| 327 |
|
| 328 |
if metrics_resp.status_code != 200:
|
|
|
|
| 404 |
}
|
| 405 |
},
|
| 406 |
headers=HEADERS,
|
| 407 |
+
timeout=90 # 增加到90秒
|
| 408 |
)
|
| 409 |
|
| 410 |
if filings_resp.status_code != 200:
|