mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Replace tokens with guest accounts, swap endpoints
This commit is contained in:
parent
d7ca353a55
commit
3572dd7771
12 changed files with 159 additions and 382 deletions
|
|
@ -3,6 +3,7 @@ import asyncdispatch, strformat, logging
|
|||
from net import Port
|
||||
from htmlgen import a
|
||||
from os import getEnv
|
||||
from json import parseJson
|
||||
|
||||
import jester
|
||||
|
||||
|
|
@ -15,8 +16,14 @@ import routes/[
|
|||
const instancesUrl = "https://github.com/zedeus/nitter/wiki/Instances"
|
||||
const issuesUrl = "https://github.com/zedeus/nitter/issues"
|
||||
|
||||
let configPath = getEnv("NITTER_CONF_FILE", "./nitter.conf")
|
||||
let (cfg, fullCfg) = getConfig(configPath)
|
||||
let
|
||||
configPath = getEnv("NITTER_CONF_FILE", "./nitter.conf")
|
||||
(cfg, fullCfg) = getConfig(configPath)
|
||||
|
||||
accountsPath = getEnv("NITTER_ACCOUNTS_FILE", "./guest_accounts.json")
|
||||
accounts = parseJson(readFile(accountsPath))
|
||||
|
||||
initAccountPool(cfg, parseJson(readFile(accountsPath)))
|
||||
|
||||
if not cfg.enableDebug:
|
||||
# Silence Jester's query warning
|
||||
|
|
@ -38,8 +45,6 @@ waitFor initRedisPool(cfg)
|
|||
stdout.write &"Connected to Redis at {cfg.redisHost}:{cfg.redisPort}\n"
|
||||
stdout.flushFile
|
||||
|
||||
asyncCheck initTokenPool(cfg)
|
||||
|
||||
createUnsupportedRouter(cfg)
|
||||
createResolverRouter(cfg)
|
||||
createPrefRouter(cfg)
|
||||
|
|
|
|||
Loading…
Reference in a new issue