refactor: integrate dashboard into server.py :8899, remove standalone dashboard
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import urllib.request,json,time
|
||||
r = urllib.request.Request(
|
||||
"https://push2.eastmoney.com/api/qt/stock/get?secid=116.00700&fields=f43,f170&fltt=2",
|
||||
headers={"User-Agent": "Mozilla/5.0"})
|
||||
start = time.time()
|
||||
resp = json.loads(urllib.request.urlopen(r, timeout=5).read())
|
||||
print(f"OK {time.time()-start:.1f}s price={resp.get('data',{}).get('f43','?')}")
|
||||
Reference in New Issue
Block a user