Change how config is loaded from env for testing

This commit is contained in:
Dylan
2023-07-02 17:54:49 +01:00
parent 828dbdca04
commit c098c0aad4
5 changed files with 26 additions and 19 deletions

View File

@ -27,6 +27,8 @@ def extractStatus_fallback(url):
if m is None:
raise twExtractError.TwExtractError(400, "Extract error")
twid = m.group(2)
if config["config"]["workaroundTokens"] == None:
raise twExtractError.TwExtractError(400, "Extract error (no tokens defined)")
# get tweet
tokens = config["config"]["workaroundTokens"].split(",")
for authToken in tokens: