feat:重构request请求模块

This commit is contained in:
2025-10-28 09:25:27 +08:00
parent a7aa32dd40
commit 857dd9bd1d
5 changed files with 76 additions and 18 deletions

View File

@@ -1,12 +1,13 @@
import requests
from message.request_message import send_request
stock_url = 'http://push2.eastmoney.com/api/qt/stock/get'
estun_id = '0.002747'
def get_today_stock(company_id=estun_id):
response = requests.get(
stock_url,
response = send_request(
url=stock_url,
method='GET',
params={'secid': company_id}
)