Skip to content

Commit

Permalink
Merge pull request shidenggui#79 from wangyu190810/master
Browse files Browse the repository at this point in the history
修复某些港股日k线图獲取錯誤 shidenggui#78
close shidenggui#78
  • Loading branch information
shidenggui authored Apr 11, 2020
2 parents 01f5d84 + 60e15a8 commit 7e800d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ target/
tmp/

secrets/

venv
8 changes: 7 additions & 1 deletion easyquotation/daykline.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ def format_response_data(self, rep_data, **kwargs):
stock_details = json.loads(raw_stocks_detail)
for stock, value in stock_details["data"].items():
stock_code = stock[2:]
stock_detail = value["qfqday"]
if "qfqday" in value:
stock_detail = value["qfqday"]
else:
stock_detail = value.get("day")
if stock_detail is None:
print("stock code data not find %s"%stock_code)
continue
stock_dict[stock_code] = stock_detail
break

Expand Down

0 comments on commit 7e800d1

Please sign in to comment.