mns-common 1.4.0.1__py3-none-any.whl → 1.4.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mns-common might be problematic. Click here for more details.
- mns_common/api/em/real_time/east_money_stock_a_api.py +2 -0
- mns_common/api/xueqiu/xue_qiu_k_line_api.py +22 -5
- {mns_common-1.4.0.1.dist-info → mns_common-1.4.0.4.dist-info}/METADATA +1 -1
- {mns_common-1.4.0.1.dist-info → mns_common-1.4.0.4.dist-info}/RECORD +6 -6
- {mns_common-1.4.0.1.dist-info → mns_common-1.4.0.4.dist-info}/WHEEL +0 -0
- {mns_common-1.4.0.1.dist-info → mns_common-1.4.0.4.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import os
|
|
3
|
+
import time
|
|
3
4
|
|
|
4
5
|
file_path = os.path.abspath(__file__)
|
|
5
6
|
end = file_path.index('mns') + 16
|
|
@@ -300,4 +301,5 @@ if __name__ == "__main__":
|
|
|
300
301
|
df = get_real_time_quotes_all_stocks(proxy)
|
|
301
302
|
logger.info("涨停数据,{}", 1)
|
|
302
303
|
else:
|
|
304
|
+
time.sleep(1)
|
|
303
305
|
logger.error("ip为空")
|
|
@@ -54,9 +54,26 @@ def get_xue_qiu_k_line(symbol, period, cookie, end_time, hq):
|
|
|
54
54
|
data=response_data['data']['item'],
|
|
55
55
|
columns=response_data['data']['column']
|
|
56
56
|
)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# 1. 转换为 datetime(自动处理毫秒级时间戳)
|
|
65
|
+
df["beijing_time"] = pd.to_datetime(df["timestamp"], unit="ms")
|
|
66
|
+
|
|
67
|
+
# 2. 设置 UTC 时区
|
|
68
|
+
df["beijing_time"] = df["beijing_time"].dt.tz_localize("UTC")
|
|
69
|
+
|
|
70
|
+
# 3. 转换为北京时间(UTC+8)
|
|
71
|
+
df["beijing_time"] = df["beijing_time"].dt.tz_convert("Asia/Shanghai")
|
|
72
|
+
|
|
73
|
+
# 4. 提取年月日(格式:YYYY-MM-DD)
|
|
74
|
+
df["str_day"] = df["beijing_time"].dt.strftime("%Y-%m-%d")
|
|
75
|
+
del df["beijing_time"]
|
|
76
|
+
|
|
60
77
|
return df
|
|
61
78
|
else:
|
|
62
79
|
# 直接抛出带有明确信息的异常
|
|
@@ -65,8 +82,8 @@ def get_xue_qiu_k_line(symbol, period, cookie, end_time, hq):
|
|
|
65
82
|
|
|
66
83
|
if __name__ == '__main__':
|
|
67
84
|
number = 1
|
|
68
|
-
cookies =
|
|
85
|
+
cookies = 'cookiesu=431747207996803; device_id=e7bd664c2ad4091241066c3a2ddbd736; xq_is_login=1; u=9627701445; s=ck12tdw0na; bid=7a2d53b7ab3873ab7ec53349413f0a21_mb9aqxtx; xq_a_token=9367502e9138a95092fac9fb24c5348edb095013; xqat=9367502e9138a95092fac9fb24c5348edb095013; xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOjk2Mjc3MDE0NDUsImlzcyI6InVjIiwiZXhwIjoxNzUyMDM2NTM4LCJjdG0iOjE3NDk0NDQ1MzgzMDgsImNpZCI6ImQ5ZDBuNEFadXAifQ.rKuCHOgTHaMp0wRkvkPjNz8YrV6oia1xVAY35MmlYPlTvIYDEqsxqI3Qyz2dh5UuBC4TSlJUmVOEbvZzrM990-RaqT1rYCPjHaAZo4qDsOz34ypEAXJBzYaz32KPTGbM9lDwOFuHxeSUFeM0R-2Lhe3UbmRPU_zEBneuCQ_vrz4DkM98qswZ9emA3B8mty-Qa-40NrCb0xLZ52Oi8VKwEJXoPmlsEE3D2vxB0v0qEaKDjBSanCpe0mHCE4ds1yHaZvfV2zSRl1PYcCF85yiCtba3jYkQJ4lR2hmk9AyYOAtnQ-1aiYGjgNpe9ETJGvnoG_o3WUJmFFl0nAENqvviNQ; xq_r_token=59ae4e9f9cc1ed66343ff1e68a7b32c0d8c27983; Hm_lvt_1db88642e346389874251b5a1eded6e3=1749548204,1749603966,1749606594,1749630748; HMACCOUNT=16733F9B51C8BBB0; is_overseas=0; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1749630957; ssxmod_itna=QqjOAKYIwGkYDQG0bGCYG2DmxewDAo40QDXDUqAQtGgnDFqAPDODCOG/iwQEgM8DbPKitDD5bh9xGXPmDA5DnGx7YDtr49v+i9gGB+eQpcAb4bRGApg4OQXWWOYB0hOEBDpAav72v1mDB3DbqDyKiIuB4GGf4GwDGoD34DiDDpfD03Db4D+nWrD7ORQMluokePDQ4GyDitQigWDA4DjIQx+G7bOPnbYDDNYeK+eIfYODYpogW0FrxqDAkDtgkbDjkPD/SGjcPDBnIkYepuEgqOp8CcaxBQD7dF=oeq8jmWNaegu/YNVBbIwCDIQGeWm3lxYWDVQG3WxOmDKID5CI3WmeYqqnDOGYu0PNb4DDPoWDbYxH/GeohS85lImlA5ot+Q0qDLizW+KaRxKoU8G08DUY2D9rN/riYGxtiqKOqxhKND+/HPeD; ssxmod_itna2=QqjOAKYIwGkYDQG0bGCYG2DmxewDAo40QDXDUqAQtGgnDFqAPDODCOG/iwQEgM8DbPKitDD5bhYxD3betID4WDLDlGWvDBq9DE0336bqjR87=Rad7dn=250R0FgdQyhaMthWK7TYTInPnkD/bGDDkB3YUTfXD4dyGD0AKw=fKlNSjmXgKBLeBgr9+CGx1qKqopRQHDtQ1daQVMwqWPa2+Z32+QuOaZc3WZXW=Pa821DB9ZXe30HfGwBv28yHVY7EmEY8yPcmMfMEMR6in3XQkYh0uCDLybC=hOxU/YkDdfxP1NRN3bLXK61i4z6hz1rKi7sBTQZ2Wjw33+O78=tSTK8dwbrKh==4+7RidD+4exl2+4Mb+Q1TobeGFsr7iGembt2QblAYrbKqDrRjsqYN9evSeQFk3tErsGdtAOsS3PgACx1mGe0mf2C5ZB5xhDKBD=7fsaKsP44D'
|
|
69
86
|
while True:
|
|
70
|
-
test_df = get_xue_qiu_k_line('
|
|
87
|
+
test_df = get_xue_qiu_k_line('SZ000001', 'day', cookies, '1749744000000', 'after')
|
|
71
88
|
print(number)
|
|
72
89
|
number = number + 1
|
|
@@ -15,7 +15,7 @@ mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py,sha256=hitzJuMwy5I
|
|
|
15
15
|
mns_common/api/em/real_time/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
16
16
|
mns_common/api/em/real_time/east_money_debt_api.py,sha256=jMvMZtlrDfExl_4jZ1hepHX8rUoeVLoLSOIhRBjkUGk,14753
|
|
17
17
|
mns_common/api/em/real_time/east_money_etf_api.py,sha256=tCyH4fNx-KfVRFuNGkgM8d_xkvR0oAfr8T3e7_XrjTM,14414
|
|
18
|
-
mns_common/api/em/real_time/east_money_stock_a_api.py,sha256=
|
|
18
|
+
mns_common/api/em/real_time/east_money_stock_a_api.py,sha256=6xYcNJyMhFFL2eNxQ9c0TbQ53wgumNovVHisXgQX7bs,12737
|
|
19
19
|
mns_common/api/em/real_time/east_money_stock_a_v2_api.py,sha256=mL4uuL6sVsC2Vnl09826AUnzxePGAUhlZ7I5BBFw8Ks,14530
|
|
20
20
|
mns_common/api/em/real_time/east_money_stock_hk_api.py,sha256=KFIYUZ3N4ULrataeCIXwZPo775O7joKgMF466uwVDdY,15154
|
|
21
21
|
mns_common/api/em/real_time/east_money_stock_us_api.py,sha256=RiTrdZDuDgTOtiMSD1Ba9aQAx4vghM66pEp_LicH3Ps,11632
|
|
@@ -71,7 +71,7 @@ mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py,sha256=eICTYaHJYp2ccsHkeDnkzpJ
|
|
|
71
71
|
mns_common/api/us/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
72
72
|
mns_common/api/us/ths_us_company_info_api.py,sha256=qQjv4F-ovQ2uuu-FlBAnxjvVA7qj9y_x5WZtUoyoEW4,241
|
|
73
73
|
mns_common/api/xueqiu/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
74
|
-
mns_common/api/xueqiu/xue_qiu_k_line_api.py,sha256=
|
|
74
|
+
mns_common/api/xueqiu/xue_qiu_k_line_api.py,sha256=rDXFI_mRZ9D39OjwM26gTGZIBWDY0eVYzdAG8jN25Xc,4553
|
|
75
75
|
mns_common/component/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
76
76
|
mns_common/component/common_service_fun_api.py,sha256=ZPPqo-ZBwSJ23I_2xXGxXyN6emYrlPqUuBGjA2Cv4gs,6629
|
|
77
77
|
mns_common/component/cache/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
@@ -152,7 +152,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
|
|
|
152
152
|
mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
|
|
153
153
|
mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
|
|
154
154
|
mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
|
|
155
|
-
mns_common-1.4.0.
|
|
156
|
-
mns_common-1.4.0.
|
|
157
|
-
mns_common-1.4.0.
|
|
158
|
-
mns_common-1.4.0.
|
|
155
|
+
mns_common-1.4.0.4.dist-info/METADATA,sha256=Xm6xKaHbQQAkKLCNFmPBd39P8tj9hraQvF1w99wMM4U,61
|
|
156
|
+
mns_common-1.4.0.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
157
|
+
mns_common-1.4.0.4.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
158
|
+
mns_common-1.4.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|