mns-common 1.4.0.2__tar.gz → 1.4.0.4__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.4.0.2 → mns_common-1.4.0.4}/PKG-INFO +1 -1
- mns_common-1.4.0.4/mns_common/api/xueqiu/xue_qiu_k_line_api.py +89 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common.egg-info/PKG-INFO +1 -1
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/setup.py +1 -1
- mns_common-1.4.0.2/mns_common/api/xueqiu/xue_qiu_k_line_api.py +0 -72
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/README.md +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/k_line_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/stock_bid_ask_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/stock_dt_pool.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/stock_zb_pool.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/stock_zt_pool_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/akshare/yjyg_sync_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/concept/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/concept/em_concept_index_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/gd/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_debt_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_etf_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_a_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_a_v2_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_hk_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_us_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/hk/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/hk/ths_hk_company_info_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/k_line/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/k_line/stock_k_line_data_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/k_line/stock_minute_data_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/common/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/common/kpl_common_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/common/kpl_common_field_constant.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/concept/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/concept/kpl_concept_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/constant/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/constant/kpl_constant.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/industry/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/industry/kpl_industry_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/selection/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/selection/kpl_selection_plate_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/symbol/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/symbol/kpl_symbol_common_field_constant.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/msg/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/msg/push_msg_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/proxies/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/proxies/liu_guan_proxy_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/qmt/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/qmt/qmt_minunte_tick_data.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/big_deal/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/big_deal/ths_big_deal_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/company/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/company/ths_company_announce_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/company/ths_company_info_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/app/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/app/ths_concept_detail_app.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/app/ths_concept_index_app.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_common_js_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_company_info_web.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_concept_detail_web.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_concept_index_web.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/self_choose/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/self_choose/ths_self_choose_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/wen_cai/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/wen_cai/ths_wen_cai_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/zt/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/zt/ths_stock_zt_pool_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/us/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/us/ths_us_company_info_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/xueqiu/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/cache/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/cache/cache_service.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/classify/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/classify/symbol_classify_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/classify/symbol_classify_param.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/common_service_fun_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/company/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/company/company_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/company/company_common_service_new_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/concept/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/concept/kpl_concept_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/concept/ths_concept_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/cookie/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/cookie/cookie_info_service.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/data/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/data/data_init_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/deal/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/deal/deal_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/deal/terminal_enum.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/em/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/em/em_real_time_quotes_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/em/em_stock_info_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/exception/ExceptionMonitor.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/exception/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/hk/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/hk/company_hk_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/industry/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/industry/ths_industry_index_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/clean/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/clean/k_line_param.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/clean/sh_small_normal_zt_k_line_check_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/common/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/common/k_line_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/patterns/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/patterns/k_line_patterns_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/patterns/pattern_Enum.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/price/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/price/trade_price_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/proxies/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/proxies/proxy_common_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/qmt/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/qmt/qmt_buy_service.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/real_time/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/real_time/real_time_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/redis_msg/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/redis_msg/redis_msg_publish_service.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/self_choose/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/self_choose/black_list_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/self_choose/self_choose_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/task/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/task/real_time_data_sync_check.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/tfp/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/tfp/stock_tfp_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/trade_date/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/trade_date/trade_date_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/zt/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/zt/zt_common_service_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/black_list_classify_enum.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/db_name_constant.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/east_money_stock_api.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/extra_income_db_name.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/price_enum.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/redis_msg_constant.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/constant/self_choose_constant.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/db/MongodbUtil.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/db/MongodbUtilLocal.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/db/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/db/v2/MongodbUtilV2.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/db/v2/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/__init__.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/async_fun.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/cmd_util.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/data_frame_util.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/date_handle_util.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/db_util.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/file_util.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/utils/ip_util.py +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common.egg-info/SOURCES.txt +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common.egg-info/dependency_links.txt +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common.egg-info/top_level.txt +0 -0
- {mns_common-1.4.0.2 → mns_common-1.4.0.4}/setup.cfg +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
import requests
|
|
9
|
+
import pandas as pd
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# year 年
|
|
13
|
+
# quarter 季度
|
|
14
|
+
# month 月度
|
|
15
|
+
# week 周
|
|
16
|
+
# day 日
|
|
17
|
+
def get_xue_qiu_k_line(symbol, period, cookie, end_time, hq):
|
|
18
|
+
url = "https://stock.xueqiu.com/v5/stock/chart/kline.json"
|
|
19
|
+
|
|
20
|
+
params = {
|
|
21
|
+
"symbol": symbol,
|
|
22
|
+
"begin": end_time,
|
|
23
|
+
"period": period,
|
|
24
|
+
"type": hq,
|
|
25
|
+
"count": "-120084",
|
|
26
|
+
"indicator": "kline,pe,pb,ps,pcf,market_capital,agt,ggt,balance"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
headers = {
|
|
30
|
+
"accept": "application/json, text/plain, */*",
|
|
31
|
+
"accept-language": "zh-CN,zh;q=0.9",
|
|
32
|
+
"origin": "https://xueqiu.com",
|
|
33
|
+
"priority": "u=1, i",
|
|
34
|
+
"referer": "https://xueqiu.com/S/SZ300879?md5__1038=n4%2BxgDniDQeWqxYwq0y%2BbDyG%2BYDtODuD7q%2BqRYID",
|
|
35
|
+
"sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"',
|
|
36
|
+
"sec-ch-ua-mobile": "?0",
|
|
37
|
+
"sec-ch-ua-platform": '"Windows"',
|
|
38
|
+
"sec-fetch-dest": "empty",
|
|
39
|
+
"sec-fetch-mode": "cors",
|
|
40
|
+
"sec-fetch-site": "same-site",
|
|
41
|
+
"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",
|
|
42
|
+
"cookie": cookie
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
response = requests.get(
|
|
46
|
+
url=url,
|
|
47
|
+
params=params,
|
|
48
|
+
headers=headers
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
if response.status_code == 200:
|
|
52
|
+
response_data = response.json()
|
|
53
|
+
df = pd.DataFrame(
|
|
54
|
+
data=response_data['data']['item'],
|
|
55
|
+
columns=response_data['data']['column']
|
|
56
|
+
)
|
|
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
|
+
|
|
77
|
+
return df
|
|
78
|
+
else:
|
|
79
|
+
# 直接抛出带有明确信息的异常
|
|
80
|
+
raise ValueError("调用雪球接口失败")
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
if __name__ == '__main__':
|
|
84
|
+
number = 1
|
|
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'
|
|
86
|
+
while True:
|
|
87
|
+
test_df = get_xue_qiu_k_line('SZ000001', 'day', cookies, '1749744000000', 'after')
|
|
88
|
+
print(number)
|
|
89
|
+
number = number + 1
|
|
@@ -1,72 +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
|
-
import requests
|
|
9
|
-
import pandas as pd
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# year 年
|
|
13
|
-
# quarter 季度
|
|
14
|
-
# month 月度
|
|
15
|
-
# week 周
|
|
16
|
-
# day 日
|
|
17
|
-
def get_xue_qiu_k_line(symbol, period, cookie, end_time, hq):
|
|
18
|
-
url = "https://stock.xueqiu.com/v5/stock/chart/kline.json"
|
|
19
|
-
|
|
20
|
-
params = {
|
|
21
|
-
"symbol": symbol,
|
|
22
|
-
"begin": end_time,
|
|
23
|
-
"period": period,
|
|
24
|
-
"type": hq,
|
|
25
|
-
"count": "-120084",
|
|
26
|
-
"indicator": "kline,pe,pb,ps,pcf,market_capital,agt,ggt,balance"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
headers = {
|
|
30
|
-
"accept": "application/json, text/plain, */*",
|
|
31
|
-
"accept-language": "zh-CN,zh;q=0.9",
|
|
32
|
-
"origin": "https://xueqiu.com",
|
|
33
|
-
"priority": "u=1, i",
|
|
34
|
-
"referer": "https://xueqiu.com/S/SZ300879?md5__1038=n4%2BxgDniDQeWqxYwq0y%2BbDyG%2BYDtODuD7q%2BqRYID",
|
|
35
|
-
"sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"',
|
|
36
|
-
"sec-ch-ua-mobile": "?0",
|
|
37
|
-
"sec-ch-ua-platform": '"Windows"',
|
|
38
|
-
"sec-fetch-dest": "empty",
|
|
39
|
-
"sec-fetch-mode": "cors",
|
|
40
|
-
"sec-fetch-site": "same-site",
|
|
41
|
-
"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",
|
|
42
|
-
"cookie": cookie
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
response = requests.get(
|
|
46
|
-
url=url,
|
|
47
|
-
params=params,
|
|
48
|
-
headers=headers
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
if response.status_code == 200:
|
|
52
|
-
response_data = response.json()
|
|
53
|
-
df = pd.DataFrame(
|
|
54
|
-
data=response_data['data']['item'],
|
|
55
|
-
columns=response_data['data']['column']
|
|
56
|
-
)
|
|
57
|
-
# 处理DataFrame列(秒级时间戳)
|
|
58
|
-
df['str_day'] = pd.to_datetime(df['timestamp'], unit='ms').dt.normalize()
|
|
59
|
-
df["str_day"] = df["str_day"].dt.strftime("%Y-%m-%d")
|
|
60
|
-
return df
|
|
61
|
-
else:
|
|
62
|
-
# 直接抛出带有明确信息的异常
|
|
63
|
-
raise ValueError("调用雪球接口失败")
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if __name__ == '__main__':
|
|
67
|
-
number = 1
|
|
68
|
-
cookies = "cookiesu=581743780372237; device_id=e315f5f93cf4d1af01436bc234312ebb; s=ci1338vttl; xq_a_token=75116a2a5439edb58d3d99533cfbc4d72e0ee819; xqat=75116a2a5439edb58d3d99533cfbc4d72e0ee819; xq_r_token=521f1781edc2a09cffdf7d59b5b3fe37c1c1f577; xq_id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1aWQiOi0xLCJpc3MiOiJ1YyIsImV4cCI6MTc0OTk0OTc1MywiY3RtIjoxNzQ4MTU5ODU3NzYwLCJjaWQiOiJkOWQwbjRBWnVwIn0.HP0CrptQ8jJjU9eJ0LhdAA_PlErW_Sp4OA5SjCyIQhKN5nTlrlovKty3IKutb5Nn_8EgeLZqrTeLKTsNIIE1uRGEppgo-Suk6_IOV1X900M47R2aBV2TX-J3rSmfyP7mAXav8CVT1pwiRU8Xr_ag3XT8WxVNQY1aOiV5JEyKeJucwvRyoa0iB4sM9j2kxcRXCF3nK9JnofsvAg-I7ySf3hCly3csj-zWQQSWeUjpmMlMS2ddLjvAHQUNbBFMTZ2BVji0ae3mURUB2jz4A6O8pZGZHuh3qDdQfeLq0i80H2AnOEqsJ246THsS7RS20HidyWWbYm3gBlRptDr1lWgsGg; u=581743780372237; Hm_lvt_1db88642e346389874251b5a1eded6e3=1746435822,1747730708,1748159904; HMACCOUNT=2CB33FC8EC07B09A; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1748159918; ssxmod_itna=QqjxRQKiTx2DgD4qbD0nYDCDpEDymxBP01kD+xQ5DODLxn+xGdqufh=z3O=DcllGdHwiYK9DDsZ4xiNDAg40iDC3md1aUr0TPz=GmnG5Gyz7AbR3Otq2Q8c51cYZO7eBpjlSgy4xAEYDQKDoxGkDiyKD0FY+Diibx0rD0eDPxDYDGbwDDyIoUxDj7gwTzOsk77eo8oDb6xhfjxDR=dDSQ8vs8Os=Y3DarY3kUxGDmKDIalKf7oDF=d3Pq0ke4i35xEnbq0OSFYG2movzUrceE0rde4FKYR1=QiqOlG4aWG4ecpxnTillebZnbVQGFzDsQRS4xDGSKHBKqxs3DqhYkCuke4CQ+YKYozoo52q5xd1E4kEmROwyY5M04aAQKD5h05NGDs0Dl0DoCs4D; ssxmod_itna2=QqjxRQKiTx2DgD4qbD0nYDCDpEDymxBP01kD+xQ5DODLxn+xGdqufh=z3O=DcllGdHwiYK4Dfi3Qe+0wxDFOihv=8B0DD/CcBOpAgn9LMTKhhSafFNwTqw64jzZ/oQMQq4dVL95j2MbxV+kj1R3inzDd47u0y0+dUbwdeLB2QA+QBj4unSq=lSq0A0LhD1xfxGMR6KPLu+bTxvmj30MbWLjxqYLcc9=ajBhTle/THgetZmeTqY7GQCa7qFTx4+IfcbdxfeFbUSI7m5ndqfBxLhOyjZidzB887ak=NR/NzFlhDkTQPSksf+WR0WNGuFSqxSFFCh5BR5iaq0bVFpxSTc3PnQ0U9RIKDN0bA02TQDezeHGhVG7Vz4QnrLi03kGg+vRU0w4p3Ti0n7Kn5CWoGUPz99Fip6GEYZi+eIdFnD75WCq0iu1AbK7AFQDNQadaG5aIDkA4Xy+7gUS5SWGEGiWGAxHg+RipnTa3B948MFWQkPG9ay8MYs4B8vYw+4ycXQQhpmHecNj9YHuooqedamM7lW4QXaFnLdSTgBlfWG2SlAwvkmjTqwKuI4LR3cys+lX/uUiw4h8mfnKhZEcaXkTA33sFo+aT2djFUm2Cr2b/ECeLiqeOCmKiYbPZUhHC9vFm48Dnz1y5azM2wBzcKc89hcKXSpR8f4MnL5RBA/KxANHjN6g4NrXv0qCK7EX0GbbDo0WOH+EC2dj4z7tYGDh5Rf3QDrYVr3YwMGWB+QCWG+Q7ofPuoOIXGBrfIeE4nhd3o4h3YKo+pD5Crd0CRYC7Kp20qMSrziDD"
|
|
69
|
-
while True:
|
|
70
|
-
test_df = get_xue_qiu_k_line('SZ000004', 'day', cookies, '1748246492232', 'after')
|
|
71
|
-
print(number)
|
|
72
|
-
number = number + 1
|
|
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
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_debt_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_a_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_a_v2_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_hk_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/em/real_time/east_money_stock_us_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.4.0.2 → mns_common-1.4.0.4}/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.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/selection/kpl_selection_plate_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/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
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/company/ths_company_announce_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/company/ths_company_info_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/app/ths_concept_detail_app.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/app/ths_concept_index_app.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_common_js_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_company_info_web.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_concept_detail_web.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/api/ths/concept/web/ths_concept_index_web.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/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.4.0.2 → mns_common-1.4.0.4}/mns_common/component/classify/symbol_classify_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/classify/symbol_classify_param.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/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.4.0.2 → mns_common-1.4.0.4}/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
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/em/em_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/exception/ExceptionMonitor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/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.4.0.2 → mns_common-1.4.0.4}/mns_common/component/k_line/patterns/pattern_Enum.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/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
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/mns_common/component/self_choose/black_list_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.2 → mns_common-1.4.0.4}/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
|