mns-common 1.3.8.9__tar.gz → 1.3.9.1__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.8.9 → mns_common-1.3.9.1}/PKG-INFO +1 -1
- mns_common-1.3.9.1/mns_common/api/xueqiu/xue_qiu_k_line_api.py +75 -0
- mns_common-1.3.9.1/mns_common/component/em/em_stock_info_api.py +42 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common.egg-info/PKG-INFO +1 -1
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/setup.py +1 -1
- mns_common-1.3.8.9/mns_common/api/xueqiu/xue_qiu_k_line_api.py +0 -70
- mns_common-1.3.8.9/mns_common/component/em/em_stock_info_api.py +0 -37
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/README.md +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/k_line_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/stock_bid_ask_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/stock_dt_pool.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/stock_zb_pool.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/stock_zt_pool_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/akshare/yjyg_sync_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/concept/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/concept/em_concept_index_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/gd/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_debt_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_etf_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_a_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_a_v2_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_hk_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_us_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/hk/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/hk/ths_hk_company_info_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/k_line/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/k_line/stock_k_line_data_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/k_line/stock_minute_data_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/common/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/common/kpl_common_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/common/kpl_common_field_constant.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/concept/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/concept/kpl_concept_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/constant/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/constant/kpl_constant.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/industry/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/industry/kpl_industry_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/selection/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/selection/kpl_selection_plate_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/symbol/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/symbol/kpl_symbol_common_field_constant.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/msg/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/msg/push_msg_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/proxies/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/proxies/liu_guan_proxy_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/qmt/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/qmt/qmt_minunte_tick_data.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/big_deal/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/big_deal/ths_big_deal_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/company/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/company/ths_company_announce_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/company/ths_company_info_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/app/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/app/ths_concept_detail_app.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/app/ths_concept_index_app.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_common_js_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_company_info_web.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_concept_detail_web.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_concept_index_web.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/self_choose/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/self_choose/ths_self_choose_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/wen_cai/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/wen_cai/ths_wen_cai_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/zt/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/zt/ths_stock_zt_pool_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/us/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/us/ths_us_company_info_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/xueqiu/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/cache/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/cache/cache_service.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/classify/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/classify/symbol_classify_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/classify/symbol_classify_param.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/common_service_fun_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/company/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/company/company_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/company/company_common_service_new_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/concept/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/concept/kpl_concept_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/concept/ths_concept_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/cookie/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/cookie/cookie_info_service.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/data/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/data/data_init_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/deal/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/deal/deal_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/deal/terminal_enum.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/em/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/em/em_real_time_quotes_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/hk/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/hk/company_hk_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/industry/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/industry/ths_industry_index_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/clean/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/clean/k_line_param.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/clean/sh_small_normal_zt_k_line_check_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/common/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/common/k_line_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/patterns/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/patterns/k_line_patterns_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/patterns/pattern_Enum.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/price/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/price/trade_price_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/proxies/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/proxies/proxy_common_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/qmt/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/qmt/qmt_buy_service.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/real_time/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/real_time/real_time_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/redis_msg/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/redis_msg/redis_msg_publish_service.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/self_choose/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/self_choose/black_list_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/self_choose/self_choose_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/task/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/task/real_time_data_sync_check.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/tfp/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/tfp/stock_tfp_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/trade_date/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/trade_date/trade_date_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/zt/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/zt/zt_common_service_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/black_list_classify_enum.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/db_name_constant.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/east_money_stock_api.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/extra_income_db_name.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/price_enum.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/redis_msg_constant.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/constant/self_choose_constant.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/db/MongodbUtil.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/db/MongodbUtilLocal.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/db/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/db/v2/MongodbUtilV2.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/db/v2/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/__init__.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/async_fun.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/cmd_util.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/data_frame_util.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/date_handle_util.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/db_util.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/file_util.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/utils/ip_util.py +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common.egg-info/SOURCES.txt +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common.egg-info/dependency_links.txt +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common.egg-info/top_level.txt +0 -0
- {mns_common-1.3.8.9 → mns_common-1.3.9.1}/setup.cfg +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
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, cookie, end_time, hq):
|
|
19
|
+
url = "https://stock.xueqiu.com/v5/stock/chart/kline.json"
|
|
20
|
+
|
|
21
|
+
params = {
|
|
22
|
+
"symbol": symbol,
|
|
23
|
+
"begin": end_time,
|
|
24
|
+
"period": period,
|
|
25
|
+
"type": hq,
|
|
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": cookie
|
|
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
|
+
return pd.DataFrame()
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
if __name__ == '__main__':
|
|
70
|
+
number = 1
|
|
71
|
+
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"
|
|
72
|
+
while True:
|
|
73
|
+
test_df = get_xue_qiu_k_line('SZ000004', 'day', cookies, '1748246492232', 'after')
|
|
74
|
+
print(number)
|
|
75
|
+
number = number + 1
|
|
@@ -0,0 +1,42 @@
|
|
|
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 mns_common.db.MongodbUtil import MongodbUtil
|
|
9
|
+
import mns_common.constant.extra_income_db_name as extra_income_db_name
|
|
10
|
+
|
|
11
|
+
mongodb_util = MongodbUtil('27017')
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 获取东方财富A股全部信息
|
|
15
|
+
def get_a_stock_info():
|
|
16
|
+
return mongodb_util.find_all_data(extra_income_db_name.EM_A_STOCK_INFO)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# 获取东方财富ETF全部信息
|
|
20
|
+
def get_etf_info():
|
|
21
|
+
return mongodb_util.find_all_data(extra_income_db_name.EM_ETF_INFO)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# 获取东方财富可转债全部信息
|
|
25
|
+
def get_kzz_info():
|
|
26
|
+
return mongodb_util.find_all_data(extra_income_db_name.EM_KZZ_INFO)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# 获取东方财富美股全部信息
|
|
30
|
+
def get_us_stock_info():
|
|
31
|
+
return mongodb_util.find_all_data(extra_income_db_name.EM_US_STOCK_INFO)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# 获取东方财富美股 eft全部信息
|
|
35
|
+
def get_us_etf_info():
|
|
36
|
+
return mongodb_util.find_all_data(extra_income_db_name.EM_US_ETF_INFO)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# 获取东方财富港股全部信息
|
|
40
|
+
|
|
41
|
+
def get_hk_stock_info():
|
|
42
|
+
return mongodb_util.find_all_data(extra_income_db_name.EM_HK_STOCK_INFO)
|
|
@@ -1,70 +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, cookie):
|
|
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": cookie
|
|
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,37 +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 mns_common.db.MongodbUtil import MongodbUtil
|
|
9
|
-
import mns_common.constant.db_name_constant as db_name_constant
|
|
10
|
-
|
|
11
|
-
mongodb_util = MongodbUtil('27017')
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# 获取东方财富A股全部信息
|
|
15
|
-
def get_a_stock_info():
|
|
16
|
-
return mongodb_util.find_all_data(db_name_constant.EM_A_STOCK_INFO)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# 获取东方财富ETF全部信息
|
|
20
|
-
def get_etf_info():
|
|
21
|
-
return mongodb_util.find_all_data(db_name_constant.EM_ETF_INFO)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# 获取东方财富可转债全部信息
|
|
25
|
-
def get_kzz_info():
|
|
26
|
-
return mongodb_util.find_all_data(db_name_constant.EM_KZZ_INFO)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
# 获取东方财富美股全部信息
|
|
30
|
-
def get_us_stock_info():
|
|
31
|
-
return mongodb_util.find_all_data(db_name_constant.EM_US_STOCK_INFO)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
# 获取东方财富港股全部信息
|
|
35
|
-
|
|
36
|
-
def get_hk_stock_info():
|
|
37
|
-
return mongodb_util.find_all_data(db_name_constant.EM_HK_STOCK_INFO)
|
|
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.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_debt_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_a_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_a_v2_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/em/real_time/east_money_stock_hk_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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.3.8.9 → mns_common-1.3.9.1}/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.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/selection/kpl_selection_plate_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/company/ths_company_announce_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/company/ths_company_info_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/app/ths_concept_detail_app.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/app/ths_concept_index_app.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_common_js_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_company_info_web.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_concept_detail_web.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/api/ths/concept/web/ths_concept_index_web.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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.8.9 → mns_common-1.3.9.1}/mns_common/component/classify/symbol_classify_api.py
RENAMED
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/mns_common/component/classify/symbol_classify_param.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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.8.9 → mns_common-1.3.9.1}/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.3.8.9 → mns_common-1.3.9.1}/mns_common/component/em/em_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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.8.9 → mns_common-1.3.9.1}/mns_common/component/k_line/patterns/pattern_Enum.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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.3.8.9 → mns_common-1.3.9.1}/mns_common/component/self_choose/black_list_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.3.8.9 → mns_common-1.3.9.1}/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
|