Improve guest accounts loading, add JSONL support

This commit is contained in:
Zed
2023-09-18 18:24:23 +00:00
parent 7abcb489f4
commit 7d14789910
5 changed files with 41 additions and 11 deletions

View File

@ -3,7 +3,6 @@ import asyncdispatch, strformat, logging
from net import Port
from htmlgen import a
from os import getEnv
from json import parseJson
import jester
@ -21,9 +20,8 @@ let
(cfg, fullCfg) = getConfig(configPath)
accountsPath = getEnv("NITTER_ACCOUNTS_FILE", "./guest_accounts.json")
accounts = parseJson(readFile(accountsPath))
initAccountPool(cfg, parseJson(readFile(accountsPath)))
initAccountPool(cfg, accountsPath)
if not cfg.enableDebug:
# Silence Jester's query warning