From 9dede2eaa1d3e68be387c5fd612eb48226a54c9d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 04 八月 2023 16:07:22 +0800 Subject: [PATCH] HOST修改 --- kpl/kpl_api.py | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/kpl/kpl_api.py b/kpl/kpl_api.py index 43f2836..d772ca8 100644 --- a/kpl/kpl_api.py +++ b/kpl/kpl_api.py @@ -82,7 +82,7 @@ # 甯傚満琛屾儏-琛屼笟 def getMarketIndustryRealRankingInfo(orderJingE_DESC=True): - data = f"Order={ 1 if orderJingE_DESC else 0}&a=RealRankingInfo&st=20&apiv=w32&Type=5&c=ZhiShuRanking&PhoneOSNew=1&DeviceID=a38adabd-99ef-3116-8bb9-6d893c846e23&VerSion=5.8.0.2&Index=0&ZSType=4&" + data = f"Order={1 if orderJingE_DESC else 0}&a=RealRankingInfo&st=20&apiv=w32&Type=5&c=ZhiShuRanking&PhoneOSNew=1&DeviceID=a38adabd-99ef-3116-8bb9-6d893c846e23&VerSion=5.8.0.2&Index=0&ZSType=4&" response = __base_request("https://apphq.longhuvip.com/w1/api/index.php", data=data) if response.status_code != 200: @@ -92,7 +92,7 @@ # 甯傚満琛屾儏-绮鹃�� def getMarketJingXuanRealRankingInfo(orderJingE_DESC=True): - data = f"Order={ 1 if orderJingE_DESC else 0}&a=RealRankingInfo&st=20&apiv=w32&Type=5&c=ZhiShuRanking&PhoneOSNew=1&DeviceID=a38adabd-99ef-3116-8bb9-6d893c846e23&VerSion=5.8.0.2&Index=0&ZSType=7&" + data = f"Order={1 if orderJingE_DESC else 0}&a=RealRankingInfo&st=20&apiv=w32&Type=5&c=ZhiShuRanking&PhoneOSNew=1&DeviceID=a38adabd-99ef-3116-8bb9-6d893c846e23&VerSion=5.8.0.2&Index=0&ZSType=7&" response = __base_request("https://apphq.longhuvip.com/w1/api/index.php", data=data) if response.status_code != 200: @@ -129,6 +129,15 @@ return response.text +# 鑾峰彇娑ㄥ箙鎺掕 +def get_jingxuan_block(code): + data = f"a=GetStockIDPlate&apiv=w32&Type=2&c=StockL2Data&StockID={code}&PhoneOSNew=1&UserID=0&DeviceID=a38adabd-99ef-3116-8bb9-6d893c846e23&VerSion=5.8.0.2&Token=0&" + response = __base_request("https://apphq.longhuvip.com/w1/api/index.php", data=data) + if response.status_code != 200: + raise Exception("璇锋眰鍑洪敊") + return response.text + + def test_l2(): code = "600981" count = 0 @@ -143,15 +152,6 @@ if __name__ == '__main__': - result = (getCodesByPlate("801085")) + result = get_jingxuan_block("600753") result = json.loads(result) - print(result["list"]) - - result = (daBanList(DABAN_TYPE_LIMIT_UP)) - result = json.loads(result) - print(len(result["list"])) - tool.get_now_time_str() - for d in result["list"]: - print(d) - # print("寮哄害", getSonPlate("801270")) - print(getMarketJingXuanRealRankingInfo(True)) + print(result["ListJX"]) -- Gitblit v1.8.0