mns-common 1.3.8.5__py3-none-any.whl → 1.3.8.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mns-common might be problematic. Click here for more details.
- mns_common/api/ths/company/ths_company_info_api.py +12 -9
- {mns_common-1.3.8.5.dist-info → mns_common-1.3.8.7.dist-info}/METADATA +1 -1
- {mns_common-1.3.8.5.dist-info → mns_common-1.3.8.7.dist-info}/RECORD +5 -5
- {mns_common-1.3.8.5.dist-info → mns_common-1.3.8.7.dist-info}/WHEEL +0 -0
- {mns_common-1.3.8.5.dist-info → mns_common-1.3.8.7.dist-info}/top_level.txt +0 -0
|
@@ -155,14 +155,17 @@ def get_company_hot_info(symbol, ths_cookie):
|
|
|
155
155
|
}
|
|
156
156
|
response = requests.get(url, headers=headers, cookies=cookies)
|
|
157
157
|
soup = BeautifulSoup(response.content, "html.parser")
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
analysis_txt = ''
|
|
159
|
+
for a in soup.find_all("a", class_="check_details f12"):
|
|
160
|
+
if "涨停分析" in a.get_text():
|
|
161
|
+
# 找到其后的兄弟节点中 class 为 check_else 的 div,包含详细内容
|
|
162
|
+
parent = a.find_parent("span", class_="performance_trailer")
|
|
163
|
+
if parent:
|
|
164
|
+
detail_div = parent.find("div", class_="check_else")
|
|
165
|
+
if detail_div:
|
|
166
|
+
analysis_txt = detail_div.get_text(separator="\n", strip=True)
|
|
167
|
+
break # 如果只要第一条,找到就结束
|
|
168
|
+
return analysis_txt
|
|
166
169
|
except BaseException as e:
|
|
167
170
|
logger.error("获取公司参股公司信息异常:{},{}", symbol, e)
|
|
168
171
|
return ''
|
|
@@ -174,5 +177,5 @@ mongodb_util = MongodbUtil('27017')
|
|
|
174
177
|
if __name__ == '__main__':
|
|
175
178
|
stock_account_info = mongodb_util.find_query_data('stock_account_info', {"type": "ths_cookie", })
|
|
176
179
|
ths_cookie_test = list(stock_account_info['cookie'])[0]
|
|
177
|
-
company_df_test =
|
|
180
|
+
company_df_test = get_company_hot_info('002331', ths_cookie_test)
|
|
178
181
|
print(company_df_test)
|
|
@@ -51,7 +51,7 @@ mns_common/api/ths/big_deal/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvn
|
|
|
51
51
|
mns_common/api/ths/big_deal/ths_big_deal_api.py,sha256=gxtIUbowxx8gDJZfT2RISrhXVmvsgbdclYbxUiZsTlY,3644
|
|
52
52
|
mns_common/api/ths/company/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
53
53
|
mns_common/api/ths/company/ths_company_announce_api.py,sha256=10N_FmtqqKwRNP_l-KrZHG90Sd73U6xOT_zz7S5vxp0,2209
|
|
54
|
-
mns_common/api/ths/company/ths_company_info_api.py,sha256=
|
|
54
|
+
mns_common/api/ths/company/ths_company_info_api.py,sha256=ka0O3nBTrAuHOtFqkaZlnQkyW_aqg_75R4ISmNgly4c,9490
|
|
55
55
|
mns_common/api/ths/concept/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
56
56
|
mns_common/api/ths/concept/app/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
57
57
|
mns_common/api/ths/concept/app/ths_concept_detail_app.py,sha256=cDme8_AFCY24YC9nSw9gUNjGqjbEHd2k-rK0zmLW3Rc,7087
|
|
@@ -150,7 +150,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
|
|
|
150
150
|
mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
|
|
151
151
|
mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
|
|
152
152
|
mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
|
|
153
|
-
mns_common-1.3.8.
|
|
154
|
-
mns_common-1.3.8.
|
|
155
|
-
mns_common-1.3.8.
|
|
156
|
-
mns_common-1.3.8.
|
|
153
|
+
mns_common-1.3.8.7.dist-info/METADATA,sha256=fxUFddm3GYguJr73yZqnGmtGVejqYLCDVPDONIxDFN0,61
|
|
154
|
+
mns_common-1.3.8.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
155
|
+
mns_common-1.3.8.7.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
156
|
+
mns_common-1.3.8.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|