Skip to content

Commit

Permalink
fix: fix stock_individual_spot_xq
Browse files Browse the repository at this point in the history
  • Loading branch information
albertandking committed Nov 29, 2024
1 parent acdfd29 commit 3966b02
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit 3966b02

Please sign in to comment.