This commit is contained in:
parent
3ce0685889
commit
a7ba0f950b
|
|
@ -996,18 +996,21 @@ def _fetch_edgar_bulk(close_map: dict[str, pd.Series]) -> dict[str, dict]:
|
|||
# Analyst + Fundamentals Cache (Verimund API)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
if not getattr(sys, "frozen", False):
|
||||
import os as _os
|
||||
_root = _os.path.dirname(_os.path.dirname(_os.path.abspath(__file__)))
|
||||
if _root not in sys.path:
|
||||
sys.path.insert(0, _root)
|
||||
del _os
|
||||
_API_URL = "https://api.verimundsolutions.com"
|
||||
|
||||
def _get_api_headers() -> dict:
|
||||
"""Read JWT from the auth cache file directly — no dependency on obfuscated license_check."""
|
||||
try:
|
||||
from license_check import _API_URL as _API_URL, get_api_headers as _get_api_headers
|
||||
except ImportError:
|
||||
_API_URL = None
|
||||
_get_api_headers = lambda: {}
|
||||
import json as _json
|
||||
_cache = os.path.join(
|
||||
os.environ.get("APPDATA", os.path.expanduser("~")),
|
||||
"StockScreener", "auth_cache.dat"
|
||||
)
|
||||
with open(_cache, "r", encoding="utf-8") as _f:
|
||||
_tok = _json.load(_f).get("jwt_token", "")
|
||||
return {"Authorization": f"Bearer {_tok}", "Content-Type": "application/json"}
|
||||
except Exception:
|
||||
return {"Content-Type": "application/json"}
|
||||
|
||||
|
||||
def _load_analyst_cache() -> dict[str, dict]:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import requests
|
|||
# ---------------------------------------------------------------------------
|
||||
# Current app version — kept in sync by push_update.py before each build.
|
||||
# ---------------------------------------------------------------------------
|
||||
APP_VERSION = "1.4.5"
|
||||
APP_VERSION = "1.4.6"
|
||||
|
||||
|
||||
def _exe_dir() -> str:
|
||||
|
|
|
|||
Loading…
Reference in New Issue