mns-common 1.2.6.4__tar.gz → 1.2.6.6__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.2.6.4 → mns_common-1.2.6.6}/PKG-INFO +1 -1
- mns_common-1.2.6.6/mns_common/api/ths/company/ths_company_info_api.py +122 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/company/company_common_service_new_api.py +2 -1
- mns_common-1.2.6.6/mns_common/component/tfp/__init__.py +7 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/constant/db_name_constant.py +3 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common.egg-info/PKG-INFO +1 -1
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common.egg-info/SOURCES.txt +2 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/setup.py +1 -1
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/README.md +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/k_line_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/stock_bid_ask_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/stock_dt_pool.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/stock_zb_pool.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/stock_zt_pool_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/akshare/yjyg_sync_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_debt_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_etf_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_stock_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_stock_gdfx_free_top_10_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_stock_hk_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_stock_v2_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/em_concept_index_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/self_choose/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/hk/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/hk/ths_hk_company_info_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/common/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/common/kpl_common_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/common/kpl_common_field_constant.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/concept/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/concept/kpl_concept_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/constant/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/constant/kpl_constant.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/industry/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/industry/kpl_industry_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/selection/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/selection/kpl_selection_plate_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/symbol/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/symbol/kpl_symbol_common_field_constant.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/msg/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/msg/push_msg_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/big_deal/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/big_deal/ths_big_deal_api.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/classify → mns_common-1.2.6.6/mns_common/api/ths/company}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/app/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/app/ths_concept_detail_app.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/app/ths_concept_index_app.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_common_js_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_company_info_web.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_concept_detail_web.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_concept_index_web.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/self_choose/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/self_choose/ths_self_choose_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/wen_cai/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/wen_cai/ths_wen_cai_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/zt/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/zt/ths_stock_zt_pool_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/cache/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/cache/cache_service.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/deal → mns_common-1.2.6.6/mns_common/component/classify}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/classify/symbol_classify_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/classify/symbol_classify_param.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/common_service_fun_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/company/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/company/company_common_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/concept/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/concept/kpl_concept_common_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/concept/ths_concept_common_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/data/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/data/data_init_api.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/hk → mns_common-1.2.6.6/mns_common/component/deal}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/deal/deal_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/deal/terminal_enum.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/price → mns_common-1.2.6.6/mns_common/component/hk}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/hk/company_hk_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/industry/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/industry/ths_industry_index_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/clean/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/clean/k_line_param.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/clean/sh_small_normal_zt_k_line_check_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/common/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/common/k_line_common_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/patterns/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/patterns/k_line_patterns_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/patterns/pattern_Enum.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/qmt → mns_common-1.2.6.6/mns_common/component/price}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/price/trade_price_service_api.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/redis_msg → mns_common-1.2.6.6/mns_common/component/qmt}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/qmt/qmt_buy_service.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/real_time/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/real_time/real_time_common_service_api.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/self_choose → mns_common-1.2.6.6/mns_common/component/redis_msg}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/redis_msg/redis_msg_publish_service.py +0 -0
- {mns_common-1.2.6.4/mns_common/component/tfp → mns_common-1.2.6.6/mns_common/component/self_choose}/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/self_choose/black_list_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/self_choose/self_choose_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/tfp/stock_tfp_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/trade_date/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/trade_date/trade_date_common_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/zt/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/zt/zt_common_service_api.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/constant/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/constant/black_list_classify_enum.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/constant/price_enum.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/constant/redis_msg_constant.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/constant/self_choose_constant.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/db/MongodbUtil.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/db/MongodbUtilLocal.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/db/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/__init__.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/async_fun.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/cmd_util.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/data_frame_util.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/date_handle_util.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/db_util.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/file_util.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/utils/ip_util.py +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common.egg-info/dependency_links.txt +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common.egg-info/top_level.txt +0 -0
- {mns_common-1.2.6.4 → mns_common-1.2.6.6}/setup.cfg +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
|
|
9
|
+
import requests
|
|
10
|
+
from bs4 import BeautifulSoup
|
|
11
|
+
import pandas as pd
|
|
12
|
+
import mns_common.utils.data_frame_util as data_frame_util
|
|
13
|
+
from loguru import logger
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# 获取参股公司 子公司 孙公司 联营企业
|
|
17
|
+
def get_company_hold_info(symbol, ths_cookie):
|
|
18
|
+
try:
|
|
19
|
+
|
|
20
|
+
url = "https://basic.10jqka.com.cn/new/" + symbol + "/company.html"
|
|
21
|
+
|
|
22
|
+
headers = {
|
|
23
|
+
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
|
|
24
|
+
"Accept-Language": "zh-CN,zh;q=0.9",
|
|
25
|
+
"Cache-Control": "max-age=0",
|
|
26
|
+
"Connection": "keep-alive",
|
|
27
|
+
"Sec-Fetch-Dest": "document",
|
|
28
|
+
"Sec-Fetch-Mode": "navigate",
|
|
29
|
+
"Sec-Fetch-Site": "cross-site",
|
|
30
|
+
"Sec-Fetch-User": "?1",
|
|
31
|
+
"Upgrade-Insecure-Requests": "1",
|
|
32
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
|
|
33
|
+
"sec-ch-ua": "\"Google Chrome\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"",
|
|
34
|
+
"sec-ch-ua-mobile": "?0",
|
|
35
|
+
"sec-ch-ua-platform": "\"Windows\"",
|
|
36
|
+
"cookie": ths_cookie
|
|
37
|
+
}
|
|
38
|
+
cookies = {
|
|
39
|
+
"searchGuide": "sg",
|
|
40
|
+
"skin_color": "white",
|
|
41
|
+
"Hm_lvt_722143063e4892925903024537075d0d": "1725031809,1725842892,1726621825,1727227162",
|
|
42
|
+
"Hm_lvt_929f8b362150b1f77b477230541dbbc2": "1725031809,1725842892,1726621825,1727227162",
|
|
43
|
+
"spversion": "20130314",
|
|
44
|
+
"user": "MDq%2BsNDQcE06Ok5vbmU6NTAwOjYxMzk4NTQ0ODo1LDEsMjA7NiwxLDIwOzcsMTExMTExMTExMTEwLDIwOzgsMTExMTAxMTEwMDAwMTExMTEwMDEwMDEwMDEwMDAwMDAsMjA7MzMsMDAwMTAwMDAwMDAwLDIwOzM2LDEwMDExMTExMDAwMDExMDAxMDExMTExMSwyMDs0NiwwMDAwMTExMTEwMDAwMDExMTExMTExMTEsMjA7NTEsMTEwMDAwMDAwMDAwMDAwMCwyMDs1OCwwMDAwMDAwMDAwMDAwMDAwMSwyMDs3OCwxLDIwOzg3LDAwMDAwMDAwMDAwMDAwMDAwMDAxMDAwMCwyMDsxMTksMDAwMDAwMDAwMDAwMDAwMDAwMTAxMDAwMDAsMjA7MTI1LDExLDIwOzQ0LDExLDQwOzEsMTAxLDQwOzIsMSw0MDszLDEsNDA7MTAyLDEsNDA6Mjc6Ojo2MDM5ODU0NDg6MTcyODQ4NzEyNjo6OjE2MzQ1NjY5ODA6NjA0ODAwOjA6MTRhZjIxYmRiNTgzODUxOTgxZWVjZGQ4NjQxZjA2NDg5OmRlZmF1bHRfNDox",
|
|
45
|
+
"userid": "603985448",
|
|
46
|
+
"u_name": "%BE%B0%D0%D0pM",
|
|
47
|
+
"escapename": "%25u666f%25u884cpM",
|
|
48
|
+
"ticket": "955f0ee44d86aede75787f64ae45bae9",
|
|
49
|
+
"user_status": "0",
|
|
50
|
+
"utk": "2df15e757efe7d4a489cf764fa371ff9",
|
|
51
|
+
"Hm_lvt_78c58f01938e4d85eaf619eae71b4ed1": "1728463065,1728526291,1728541890,1728550124",
|
|
52
|
+
"historystock": "301551%7C*%7C002205%7C*%7C000627%7C*%7C300746%7C*%7C300139",
|
|
53
|
+
"reviewJump": "nojump",
|
|
54
|
+
"usersurvey": "1",
|
|
55
|
+
"v": "A8mumxxpynGwb7YF90Bxvvav2P4mFrxUJwzh32s-RzXtX-dgs2bNGLda8aj4"
|
|
56
|
+
}
|
|
57
|
+
response = requests.get(url, headers=headers, cookies=cookies)
|
|
58
|
+
soup = BeautifulSoup(response.content, "lxml")
|
|
59
|
+
|
|
60
|
+
# 找到表格
|
|
61
|
+
table = soup.find('table', id='ckg_table')
|
|
62
|
+
|
|
63
|
+
# 提取表头
|
|
64
|
+
table_headers = [header.get_text(strip=True) for header in table.find_all('th')]
|
|
65
|
+
|
|
66
|
+
# 提取表格数据
|
|
67
|
+
data = []
|
|
68
|
+
for row in table.find_all('tr')[1:]: # 跳过表头
|
|
69
|
+
cells = [cell.get_text(strip=True) for cell in row.find_all('td')]
|
|
70
|
+
if cells: # 确保行不为空
|
|
71
|
+
data.append(cells)
|
|
72
|
+
|
|
73
|
+
# 创建 DataFrame
|
|
74
|
+
df = pd.DataFrame(data, columns=table_headers)
|
|
75
|
+
if data_frame_util.is_empty(df):
|
|
76
|
+
return pd.DataFrame()
|
|
77
|
+
del df['序号']
|
|
78
|
+
|
|
79
|
+
['序号', '关联公司名称', '参控关系', '参控比例', '投资金额(元)', '被参控公司净利润(元)', '是否报表合并',
|
|
80
|
+
'被参股公司主营业务']
|
|
81
|
+
|
|
82
|
+
df = df.rename(columns={"关联公司名称": "holding_company",
|
|
83
|
+
"参控关系": "holding_relation",
|
|
84
|
+
"参控比例": "holding_percent_name",
|
|
85
|
+
"投资金额(元)": "invest_amount_name",
|
|
86
|
+
"被参控公司净利润(元)": "holding_net_profit_name",
|
|
87
|
+
"是否报表合并": "consolidation_report",
|
|
88
|
+
"被参股公司主营业务": "holding_main_business"
|
|
89
|
+
})
|
|
90
|
+
df['holding_percent'] = df['holding_percent_name'].apply(convert_to_float)
|
|
91
|
+
df['invest_amount'] = df['invest_amount_name'].apply(convert_to_float)
|
|
92
|
+
df['holding_net_profit'] = df['holding_net_profit_name'].apply(convert_to_float)
|
|
93
|
+
df['symbol'] = symbol
|
|
94
|
+
|
|
95
|
+
return df
|
|
96
|
+
except BaseException as e:
|
|
97
|
+
logger.error("获取公司参股公司信息异常:{},{}", symbol, e)
|
|
98
|
+
return pd.DataFrame()
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# 数据清洗与转换
|
|
102
|
+
# 定义一个函数将带有单位的字符串转换为数字
|
|
103
|
+
def convert_to_float(value):
|
|
104
|
+
if '亿' in value:
|
|
105
|
+
return float(value.replace('亿', '').replace(' ', '').replace('元', '')) * 1e8
|
|
106
|
+
elif '%' in value:
|
|
107
|
+
return float(value.replace('%', '').replace(' ', '')) / 100
|
|
108
|
+
elif '万' in value:
|
|
109
|
+
return float(value.replace('万', '').replace(' ', '').replace('元', '')) * 1e5
|
|
110
|
+
elif '未披露' in value:
|
|
111
|
+
return 0
|
|
112
|
+
return -1
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
from mns_common.db.MongodbUtil import MongodbUtil
|
|
116
|
+
|
|
117
|
+
mongodb_util = MongodbUtil('27017')
|
|
118
|
+
if __name__ == '__main__':
|
|
119
|
+
stock_account_info = mongodb_util.find_query_data('stock_account_info', {"type": "ths_cookie", })
|
|
120
|
+
ths_cookie_test = list(stock_account_info['cookie'])[0]
|
|
121
|
+
company_df_test = get_company_hold_info('000617', ths_cookie_test)
|
|
122
|
+
print(company_df_test)
|
|
@@ -71,7 +71,8 @@ def amend_ths_industry(real_time_quotes_now_init):
|
|
|
71
71
|
"kpl_plate_name": 1, "kpl_plate_list_info": 1,
|
|
72
72
|
'operate_profit': 1,
|
|
73
73
|
'total_operate_income': 1,
|
|
74
|
-
"name": 1
|
|
74
|
+
"name": 1,
|
|
75
|
+
'pb': 1, 'pe_ttm': 1, 'ROE': 1
|
|
75
76
|
}
|
|
76
77
|
query_field_key = str(query_field)
|
|
77
78
|
query = {}
|
|
@@ -45,6 +45,8 @@ mns_common/api/msg/push_msg_api.py
|
|
|
45
45
|
mns_common/api/ths/__init__.py
|
|
46
46
|
mns_common/api/ths/big_deal/__init__.py
|
|
47
47
|
mns_common/api/ths/big_deal/ths_big_deal_api.py
|
|
48
|
+
mns_common/api/ths/company/__init__.py
|
|
49
|
+
mns_common/api/ths/company/ths_company_info_api.py
|
|
48
50
|
mns_common/api/ths/concept/__init__.py
|
|
49
51
|
mns_common/api/ths/concept/app/__init__.py
|
|
50
52
|
mns_common/api/ths/concept/app/ths_concept_detail_app.py
|
|
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.2.6.4 → mns_common-1.2.6.6}/mns_common/api/em/east_money_stock_gdfx_free_top_10_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.2.6.4 → mns_common-1.2.6.6}/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.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/selection/kpl_selection_plate_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/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.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/app/ths_concept_detail_app.py
RENAMED
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/app/ths_concept_index_app.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_common_js_api.py
RENAMED
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_company_info_web.py
RENAMED
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_concept_detail_web.py
RENAMED
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/api/ths/concept/web/ths_concept_index_web.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/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
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/classify/symbol_classify_api.py
RENAMED
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/mns_common/component/classify/symbol_classify_param.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/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.2.6.4 → mns_common-1.2.6.6}/mns_common/component/k_line/patterns/pattern_Enum.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.2.6.4 → mns_common-1.2.6.6}/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.2.6.4 → mns_common-1.2.6.6}/mns_common/component/self_choose/black_list_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
|
|
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
|