fix: deploy scripts/ files properly (correct directory)
This commit is contained in:
@@ -38,6 +38,10 @@ SIGNAL_FAILURES = {
|
||||
|
||||
|
||||
def fetch_price(code):
|
||||
# DB 优先
|
||||
try: from mofin_db import get_price_from_db; p, _ = get_price_from_db(code); return p if p else 0
|
||||
except: pass
|
||||
# Fallback: 腾讯 API
|
||||
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