Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #5385

Merged
merged 3 commits into from
Nov 29, 2024
Merged

Dev #5385

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2946,9 +2946,10 @@
1.15.34 fix: fix fund_open_fund_rank_em interface
1.15.35 fix: fix futures_spot_price_daily interface
1.15.36 fix: fix futures_global_em interface
1.15.37 fix: fix stock_individual_spot_xq interface
"""

__version__ = "1.15.36"
__version__ = "1.15.37"
__author__ = "AKFamily"

import sys
Expand Down
2 changes: 1 addition & 1 deletion akshare/fund/fund_rank_em.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def fund_exchange_rank_em() -> pd.DataFrame:
"sc": "1nzf",
"st": "desc",
"pi": "1",
"pn": "10000",
"pn": "30000",
"v": "0.1591891419018292",
}
headers = {
Expand Down
6 changes: 2 additions & 4 deletions akshare/stock/stock_xq.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# !/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2024/10/14 21:20
Date: 2024/11/29 21:20
Desc: 雪球-行情中心-个股
https://xueqiu.com/S/SH513520
"""
Expand All @@ -21,9 +21,7 @@ def _convert_timestamp(timestamp_ms: int) -> str:
:return: 字符串
:rtype: str
"""
# 将毫秒转换为秒
timestamp_s = timestamp_ms / 1000
# 使用 fromtimestamp 方法将时间戳转换为 datetime 对象
datetime_obj = datetime.fromtimestamp(timestamp_s)
return datetime_obj.strftime("%Y-%m-%d %H:%M:%S")

Expand All @@ -44,7 +42,7 @@ def stock_individual_spot_xq(
"""
session = requests.Session()
headers = {
"cookie": "xq_a_token=7716f523735d1e47a3dd5ec748923068ab8198a8;",
"cookie": "xq_a_token=691d6f0a678b98a172affb89759b9c46fd23b4e2;",
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 "
"(KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1",
}
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@

## 更新说明详情

1.15.37 fix: fix stock_individual_spot_xq interface

1. 修复 stock_individual_spot_xq 接口

1.15.36 fix: fix futures_global_em interface

1. 修复 futures_global_em 接口
Expand Down Expand Up @@ -4809,6 +4813,8 @@

## 版本更新说明

1.15.37 fix: fix stock_individual_spot_xq interface

1.15.36 fix: fix futures_global_em interface

1.15.35 fix: fix futures_spot_price_daily interface
Expand Down