Skip to content

Commit

Permalink
Merge pull request #1 from cds-1993/cds-1993-patch-1
Browse files Browse the repository at this point in the history
Update 003_源码实现_异步版本.py
  • Loading branch information
cds-1993 authored Apr 17, 2024
2 parents 6ebab75 + 2007e85 commit c238978
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def send_request(page_start: int, page_size: int) -> Dict[str, Any]:
response = await client.post(url=req_url, params=common_params, json=common_payload_data, headers=headers,
timeout=30)
if response.status_code != 200:
raise Exception("发起请求是发生异常,请求发生错误,原因:", response.text)
raise Exception("发起请求时发生异常,请求发生错误,原因:", response.text)
try:
response_dict: Dict = response.json()
return response_dict
Expand Down Expand Up @@ -123,7 +123,7 @@ async def run_crawler(save_file_name: str) -> None:
"""
# step1 获取最大数据总量
max_total: int = await get_max_total_count()
# step2 遍历每一夜数据并解析存储到数据容器中
# step2 遍历每一页数据并解析存储到数据容器中
data_list: List[SymbolContent] = await fetch_currency_data_list(max_total)
# step3 将数据容器中的数据保存csv
await save_data_to_csv(save_file_name, data_list)
Expand Down

0 comments on commit c238978

Please sign in to comment.