mns-common 1.3.5.9__tar.gz → 1.3.6.0__tar.gz
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-1.3.5.9 → mns_common-1.3.6.0}/PKG-INFO +1 -1
- mns_common-1.3.6.0/mns_common/api/xueqiu/xue_qiu_k_line_api.py +70 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common.egg-info/PKG-INFO +1 -1
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/setup.py +1 -1
- mns_common-1.3.5.9/mns_common/api/xueqiu/xue_qiu_k_line_api.py +0 -88
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/README.md +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/k_line_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/stock_bid_ask_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/stock_dt_pool.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/stock_zb_pool.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/stock_zt_pool_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/akshare/yjyg_sync_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_debt_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_etf_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_gdfx_free_top_10_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_hk_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_quotes_sync_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_us_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_v2_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/em_concept_index_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/hk/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/hk/ths_hk_company_info_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/k_line/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/k_line/stock_k_line_data_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/k_line/stock_minute_data_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/common/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/common/kpl_common_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/common/kpl_common_field_constant.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/concept/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/concept/kpl_concept_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/constant/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/constant/kpl_constant.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/industry/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/industry/kpl_industry_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/selection/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/selection/kpl_selection_plate_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/symbol/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/symbol/kpl_symbol_common_field_constant.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/msg/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/msg/push_msg_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/qmt/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/qmt/qmt_minunte_tick_data.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/big_deal/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/big_deal/ths_big_deal_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/company/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/company/ths_company_announce_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/company/ths_company_info_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/app/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/app/ths_concept_detail_app.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/app/ths_concept_index_app.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_common_js_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_company_info_web.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_concept_detail_web.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_concept_index_web.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/self_choose/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/self_choose/ths_self_choose_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/wen_cai/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/wen_cai/ths_wen_cai_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/zt/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/zt/ths_stock_zt_pool_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/us/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/us/ths_us_company_info_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/xueqiu/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/cache/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/cache/cache_service.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/classify/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/classify/symbol_classify_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/classify/symbol_classify_param.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/common_service_fun_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/company/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/company/company_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/company/company_common_service_new_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/concept/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/concept/kpl_concept_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/concept/ths_concept_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/cookie/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/cookie/cookie_info_service.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/data/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/data/data_init_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/deal/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/deal/deal_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/deal/terminal_enum.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/hk/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/hk/company_hk_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/industry/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/industry/ths_industry_index_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/clean/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/clean/k_line_param.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/clean/sh_small_normal_zt_k_line_check_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/common/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/common/k_line_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/patterns/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/patterns/k_line_patterns_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/patterns/pattern_Enum.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/price/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/price/trade_price_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/qmt/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/qmt/qmt_buy_service.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/real_time/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/real_time/real_time_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/redis_msg/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/redis_msg/redis_msg_publish_service.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/self_choose/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/self_choose/black_list_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/self_choose/self_choose_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/task/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/task/real_time_data_sync_check.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/tfp/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/tfp/stock_tfp_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/trade_date/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/trade_date/trade_date_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/zt/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/zt/zt_common_service_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/black_list_classify_enum.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/db_name_constant.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/east_money_stock_api.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/extra_income_db_name.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/price_enum.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/redis_msg_constant.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/constant/self_choose_constant.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/db/MongodbUtil.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/db/MongodbUtilLocal.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/db/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/db/v2/MongodbUtilV2.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/db/v2/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/__init__.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/async_fun.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/cmd_util.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/data_frame_util.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/date_handle_util.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/db_util.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/file_util.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/utils/ip_util.py +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common.egg-info/SOURCES.txt +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common.egg-info/dependency_links.txt +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common.egg-info/top_level.txt +0 -0
- {mns_common-1.3.5.9 → mns_common-1.3.6.0}/setup.cfg +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
file_path = os.path.abspath(__file__)
|
|
5
|
+
end = file_path.index('mns') + 16
|
|
6
|
+
project_path = file_path[0:end]
|
|
7
|
+
sys.path.append(project_path)
|
|
8
|
+
from loguru import logger
|
|
9
|
+
import requests
|
|
10
|
+
import pandas as pd
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# year 年
|
|
14
|
+
# quarter 季度
|
|
15
|
+
# month 月度
|
|
16
|
+
# week 周
|
|
17
|
+
# day 日
|
|
18
|
+
def get_xue_qiu_k_line(symbol, period):
|
|
19
|
+
url = "https://stock.xueqiu.com/v5/stock/chart/kline.json"
|
|
20
|
+
|
|
21
|
+
params = {
|
|
22
|
+
"symbol": symbol,
|
|
23
|
+
"begin": "1742574377493",
|
|
24
|
+
"period": period,
|
|
25
|
+
"type": "before",
|
|
26
|
+
"count": "-120084",
|
|
27
|
+
"indicator": "kline,pe,pb,ps,pcf,market_capital,agt,ggt,balance"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
headers = {
|
|
31
|
+
"accept": "application/json, text/plain, */*",
|
|
32
|
+
"accept-language": "zh-CN,zh;q=0.9",
|
|
33
|
+
"origin": "https://xueqiu.com",
|
|
34
|
+
"priority": "u=1, i",
|
|
35
|
+
"referer": "https://xueqiu.com/S/SZ300879?md5__1038=n4%2BxgDniDQeWqxYwq0y%2BbDyG%2BYDtODuD7q%2BqRYID",
|
|
36
|
+
"sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"',
|
|
37
|
+
"sec-ch-ua-mobile": "?0",
|
|
38
|
+
"sec-ch-ua-platform": '"Windows"',
|
|
39
|
+
"sec-fetch-dest": "empty",
|
|
40
|
+
"sec-fetch-mode": "cors",
|
|
41
|
+
"sec-fetch-site": "same-site",
|
|
42
|
+
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
|
|
43
|
+
"cookie": "cookiesu=401743509129481; device_id=e7bd664c2ad4091241066c3a2ddbd736; remember=1; xq_is_login=1; u=9627701445; xq_a_token=4d1dc50464f7995ed9da20125e94fc77df0605d4; xqat=4d1dc50464f7995ed9da20125e94fc77df0605d4; xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOjk2Mjc3MDE0NDUsImlzcyI6InVjIiwiZXhwIjoxNzQ2NjM0MzExLCJjdG0iOjE3NDQwNDIzMTE3OTIsImNpZCI6ImQ5ZDBuNEFadXAifQ.ehhu6ZGP8bXmIO4rB_UDPgCg7P996ExBcXkeuVRMTmswc_ZIRntQ04sv0nRoW7r6dBU10BIEFQmA3bvZO7kYuDKBVrCR86KBzDC5_3X6dTtHgb-Yr405r5ts-aQo0eYlDp4DMigJsfp6deH-058sKQlIIQajTjK4OI-0RZBNVPx6jhQcNHAJCpHNmUc613EnYTMOs9DUADOY63KIbf9VOz6fQyNd5bnyAkU0ubsoVMWu5_cFx14UUgq5BipMzG9zsjbWcXjqp2VsGQ42sJ9x-L_uqLaWdpcz5K8JqNTkvV6ADbsG3yOlzp4kdS-1WBVEYjj4vZv7UWe8eB6Aaf4Uyg; xq_r_token=cfb922056d8dd2e5212255f2fb0958cd6d98b416; Hm_lvt_1db88642e346389874251b5a1eded6e3=1744115609,1744116531,1744123698,1744128314; HMACCOUNT=1CFFE969351DFC92; is_overseas=0; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1744131160; ssxmod_itna=QqAx0DRGiQdbei7ditG8DI6KGRQrD2jDl4BttiGgDYq7=GFiDCOizO1CxBKA6Kd3Dj22AxWRxGXPmDA5Dnzx7YDt=SPxDB7YHi1KjnG+beSAj7e4qOaUehb3qQGnYFmEat0USSVYmkeDHxi8DB9DYG9FDenWDCeDQxirDD4DAQPDFxibDimI34DdTIOvstOwCDGrDlKDRx07CC3DWxDFTU0HKQgj48ExDGvxqk04rhP4DmRmC37LCl3Dn=Dv=QoD9p4DsOh9M4DCky6x+Roc=mQb=USfDCKDjoLIe/fQFbfv3IQ8e7vskhDjQ4dGvPGP3CGxeeViDRWQ1ei4Aqn7xdGPdQmqKmVjptt4DDcDo2Ky4xF0KHvM+ymIHZKhDrDxwOzFDbGYbYx7QGH9OUiTtBho5iq4+Pnri9Yie+ewo+DYPeD; ssxmod_itna2=QqAx0DRGiQdbei7ditG8DI6KGRQrD2jDl4BttiGgDYq7=GFiDCOizO1CxBKA6Kd3Dj22AxWKxDfCecxD5qDFrv4A=iDGX5is6Y7iAYQig8n7YGzGl9xrojBSddLV8xkjxkone8iq0Ejc4Mp9dBZRzPA9deDpPqmaGYSyOCPcDFDghi=DFWRBDNbo1/a9OqenaQKqsemSFI9SHF/AfvOhsQKP4=c8UGgBad0AE/2Owk9MOs/71ihBwzgQRHPZROZgINUiWdQZxbp1frOOL8c=AO6yjHaiGk+O7XUoF4UcHo+0HaKzTSG9yWDxwEiihkhxtkizH4ttfkd3xGrGSB3MrTqB=pOkhwdx+CYmb8l+0xxKbbYWsYfa88ajgN3l=Crtd8T0eijCG=AGk8+LnWqWt6O+wL3ZOoto5rr5xQksExto71TEISWtk+jE3P0WF7NW0DNS+7pD8pL8dEx2sGRb=riia3v=kopew0Du6UYY5l0=HjdFi5zEUn1DwBUdiDD"
|
|
44
|
+
}
|
|
45
|
+
try:
|
|
46
|
+
response = requests.get(
|
|
47
|
+
url=url,
|
|
48
|
+
params=params,
|
|
49
|
+
headers=headers
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
if response.status_code == 200:
|
|
53
|
+
response_data = response.json()
|
|
54
|
+
df = pd.DataFrame(
|
|
55
|
+
data=response_data['data']['item'],
|
|
56
|
+
columns=response_data['data']['column']
|
|
57
|
+
)
|
|
58
|
+
# 处理DataFrame列(秒级时间戳)
|
|
59
|
+
df['str_day'] = pd.to_datetime(df['timestamp'], unit='ms').dt.normalize()
|
|
60
|
+
df["str_day"] = df["str_day"].dt.strftime("%Y-%m-%d")
|
|
61
|
+
return df
|
|
62
|
+
else:
|
|
63
|
+
return pd.DataFrame()
|
|
64
|
+
except BaseException as e:
|
|
65
|
+
logger.error("同步股票年度数据出现异常:{},{}", symbol, e)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if __name__ == '__main__':
|
|
69
|
+
test_df = get_xue_qiu_k_line('SZ000001', 'year')
|
|
70
|
+
print(test_df)
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
file_path = os.path.abspath(__file__)
|
|
5
|
-
end = file_path.index('mns') + 16
|
|
6
|
-
project_path = file_path[0:end]
|
|
7
|
-
sys.path.append(project_path)
|
|
8
|
-
from loguru import logger
|
|
9
|
-
import requests
|
|
10
|
-
import pandas as pd
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# year 年
|
|
14
|
-
# quarter 季度
|
|
15
|
-
# month 月度
|
|
16
|
-
# week 周
|
|
17
|
-
# day 日
|
|
18
|
-
def get_xue_qiu_k_line(symbol, period):
|
|
19
|
-
url = "https://stock.xueqiu.com/v5/stock/chart/kline.json"
|
|
20
|
-
|
|
21
|
-
params = {
|
|
22
|
-
"symbol": symbol,
|
|
23
|
-
"begin": "1742574377493",
|
|
24
|
-
"period": period,
|
|
25
|
-
"type": "before",
|
|
26
|
-
"count": "-120084",
|
|
27
|
-
"indicator": "kline,pe,pb,ps,pcf,market_capital,agt,ggt,balance"
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
headers = {
|
|
31
|
-
"accept": "application/json, text/plain, */*",
|
|
32
|
-
"accept-language": "zh-CN,zh;q=0.9",
|
|
33
|
-
"origin": "https://xueqiu.com",
|
|
34
|
-
"priority": "u=1, i",
|
|
35
|
-
"referer": "https://xueqiu.com/S/SZ300879?md5__1038=n4%2BxgDniDQeWqxYwq0y%2BbDyG%2BYDtODuD7q%2BqRYID",
|
|
36
|
-
"sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"',
|
|
37
|
-
"sec-ch-ua-mobile": "?0",
|
|
38
|
-
"sec-ch-ua-platform": '"Windows"',
|
|
39
|
-
"sec-fetch-dest": "empty",
|
|
40
|
-
"sec-fetch-mode": "cors",
|
|
41
|
-
"sec-fetch-site": "same-site",
|
|
42
|
-
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
|
|
43
|
-
"cookie": "xq_a_token=cc9943aa6d41f0ae420f49b428f2f90a472b070a;"
|
|
44
|
-
" xqat=cc9943aa6d41f0ae420f49b428f2f90a472b070a; "
|
|
45
|
-
"xq_r_token=20869bd02083b2ef75d4d4b7654f827f00fdcd22;"
|
|
46
|
-
" xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOi0xLCJpc3MiOiJ1YyIsImV4cCI6MTc0NDc2NTA3MCwiY3RtIjoxNzQyNDg4OD"
|
|
47
|
-
"kyNDc1LCJjaWQiOiJkOWQwbjRBWnVwIn0.Ep9IIWPMwb85xYIJ_pmYTDmUmcySD4t5nv4LpYSqdLJzNzqgvzGFx6vowXm-ZtyePuppJxd2YjJDREHu7OkvZk"
|
|
48
|
-
"qHRGMGQOhuCDzyMQjpND2yTgyOTNkn2hNs0e5p4FihaSeRmLu8vQDU17No3LjM3y4-0caZ-8LNJnOm0Wet1uOD7h9ASf7sLRQCjGyB-Pd4D2r-213umj7c6TD"
|
|
49
|
-
"V5ud3rfTsUlCG7DwWMAdIZGkew5CX2WRXOz-G2Duf3d4GMRggiaLHVsP6PSTzOGUQBF1zAg5hprkxK3J_dV1SdiuaAZxJDp3FCFQ5vG0JkcOs9CLB5z-92kQ2-"
|
|
50
|
-
"YEhAkd3PCpGKQ; cookiesu=251742488951389; u=251742488951389; is_overseas=0; Hm_lvt_1db88642e346389874251b5a1eded6e3=1742488952; "
|
|
51
|
-
"Hm_lpvt_1db88642e346389874251b5a1eded6e3=1742488952; HMACCOUNT=A216813C8A2D1B76; device_id=e7bd664c2ad4091241066c3a2ddbd736; "
|
|
52
|
-
"ssxmod_itna=eqIxgDB7q+0=ei7qqAKG7D8D9DQqqiIqGHDyxW9P0CGDLxn4GQDUiHxttBmPvc7EkqE5gD0yG3wDA5Dnzx7YDt=SpND0mTAc3qACQIwPw+Ocyrm2tfA"
|
|
53
|
-
"br4MWHlPP5jokUkpQw5xB3DExGkeeu77xiirx0rD0eDPxDYDGbWD7PDoxDrF8YDjl7pOUgwoz4DKx0kDY5Dw1RADiPD7ZBDkOcwXSvmFxDzFZLaqle42Di3N+EsEzRfDi5"
|
|
54
|
-
"x79cwD7v3DlaPFsdD0119FgoIiya2PpBEv40OD0ILF4BfuYoA8872wprrZQ4F2G0YjEDQ0DO03e7qSh5tY7t0sOGe2GDNQKc3xeY5ldw7xDipwGg2QIhxjhrCtccU5ZUB="
|
|
55
|
-
"+VcwwiGxCeBGPyew=jp=lDqQ4ZAqzBqPj0=jh1Fxq7De903iYLYD; ssxmod_itna2=eqIxgDB7q+0=ei7qqAKG7D8D9DQqqiIqGHDyxW9P0CGDLxn4GQDUiHxttBmPvc7E"
|
|
56
|
-
"kqE5wDDcA73imLDD7Djbb5NZaEoD/zpofwEa9m=Fn7T5jOiFKWsbAb9Qi=utFFLry0Ii9=+TINLqBPqzemrFP/ehSZRDixpiEh5WeA5WXGvaHoKw+rEINZbPjOApkpEQG8cm="
|
|
57
|
-
"rHCN=0DUoI+HxcF6Zohnh3hUEcTYQykDVyXyfHsX9eFZAlAHxdWq/5qZ=Eh0KCAV2xA2/yKFtivK+DzQb0sajPwql5xkzLh966v0g6MzzUlc4SFYAv3YKBjP7rhhOdqmKEa"
|
|
58
|
-
"j6C6PKp+Pq2QEP6heBX7BU7iG=GGLA6IrDjYvHCDh1tr93XpUr9X9rPjYUvWxPI0RBwHUpC+fs6xsg07+ifjd9gU26do2K0lLwRhhPfppAKj5+gow2IN3KLQ0K1P/mY9BKKYAt"
|
|
59
|
-
"2Qx/34rb5evohIrUI=DKe1djnDvrDnjwcBbgK2lzA3eQVix=46cxf77D9GKug6PLBL0Fi67Htrl2K5CP9PQDHb1Yjx0ttRKjCU7hE3GIs2Y88AdxfF+Iuc2=IenBfqW52ngad82Y"
|
|
60
|
-
"8KvKqn5xEiODXgYCKgGxyOjl4+v9bvIm120i2pN6o6dBRZqxpvsA4S9YP2TPjS+1/4ZnVeYQ+4=UCevs5P3Qf2x6w8s=U7dD=cvG1skhxiD8Kjl32RGPC=4FDHIrQQoKGnixsWzp"
|
|
61
|
-
"Fb7F=PlrD/3=0F6DNx2hDnr4RDW7WGYSiPQFihqY15iS7GAr44w1+x/3wnYQ4=rN/wOitjqZ0N0FRpxlw/7PGeZADD"
|
|
62
|
-
}
|
|
63
|
-
try:
|
|
64
|
-
response = requests.get(
|
|
65
|
-
url=url,
|
|
66
|
-
params=params,
|
|
67
|
-
headers=headers
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
if response.status_code == 200:
|
|
71
|
-
response_data = response.json()
|
|
72
|
-
df = pd.DataFrame(
|
|
73
|
-
data=response_data['data']['item'],
|
|
74
|
-
columns=response_data['data']['column']
|
|
75
|
-
)
|
|
76
|
-
# 处理DataFrame列(秒级时间戳)
|
|
77
|
-
df['str_day'] = pd.to_datetime(df['timestamp'], unit='ms').dt.normalize()
|
|
78
|
-
df["str_day"] = df["str_day"].dt.strftime("%Y-%m-%d")
|
|
79
|
-
return df
|
|
80
|
-
else:
|
|
81
|
-
return pd.DataFrame()
|
|
82
|
-
except BaseException as e:
|
|
83
|
-
logger.error("同步股票年度数据出现异常:{},{}", symbol, e)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if __name__ == '__main__':
|
|
87
|
-
test_df = get_xue_qiu_k_line('SZ000001', 'year')
|
|
88
|
-
print(test_df)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_gdfx_free_top_10_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/em/east_money_stock_quotes_sync_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/common/kpl_common_field_constant.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/selection/kpl_selection_plate_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/company/ths_company_announce_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/company/ths_company_info_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/app/ths_concept_detail_app.py
RENAMED
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/app/ths_concept_index_app.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_common_js_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_company_info_web.py
RENAMED
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_concept_detail_web.py
RENAMED
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/concept/web/ths_concept_index_web.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/api/ths/self_choose/ths_self_choose_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/classify/symbol_classify_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/classify/symbol_classify_param.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/company/company_common_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/cookie/cookie_info_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/industry/ths_industry_index_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/k_line/patterns/pattern_Enum.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/price/trade_price_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/self_choose/black_list_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.5.9 → mns_common-1.3.6.0}/mns_common/component/task/real_time_data_sync_check.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|