fix: deploy scripts/ files properly (correct directory)
This commit is contained in:
@@ -30,7 +30,11 @@ def clean_proxy():
|
||||
|
||||
|
||||
def fetch_quote(code):
|
||||
"""拉腾讯行情,返回 dict"""
|
||||
"""拉行情。DB 优先,腾讯 fallback"""
|
||||
# DB 优先
|
||||
try: from mofin_db import get_price_from_db; p, chg = get_price_from_db(code); return {"name":"", "code":code, "price":p, "change_pct":chg or 0} if p else None
|
||||
except: pass
|
||||
# Fallback: 腾讯
|
||||
try:
|
||||
prefix = "sh" if code.startswith(('60','68','51','56','50')) else "sz" if code.startswith(('00','30','15')) else "hk"
|
||||
url = f"http://qt.gtimg.cn/q={prefix}{code}"
|
||||
|
||||
Reference in New Issue
Block a user