| | |
| | | result = response.text |
| | | result = json.loads(result) |
| | | return result.get("ListJX") |
| | | |
| | | |
| | | # 获取自由流通市值 |
| | | def getZYLTAmount(code): |
| | | data = f"a=GetStockPanKou_Narrow&apiv=w32&c=StockL2Data&VerSion=5.8.0.2&State=1&PhoneOSNew=1&DeviceID=a38adabd-99ef-3116-8bb9-6d893c846e23&StockID={code}&" |
| | | response = __base_request("https://apphq.longhuvip.com/w1/api/index.php", data=data) |
| | | if response.status_code != 200: |
| | | raise Exception("请求出错") |
| | | result = response.text |
| | | result = json.loads(result) |
| | | if "real" in result: |
| | | return result["real"].get("actualcirculation_value") |
| | | return None |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | print(getZYLTAmount("000333")) |