fix deprecation

This commit is contained in:
Thephaseless 2024-09-13 18:03:38 +00:00
parent 7fb8a63219
commit 20017a95ac
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
import logging
import time import time
import uvicorn import uvicorn
@ -13,7 +14,7 @@ from src.utils import logger
from src.utils.browser import bypass_cloudflare, new_browser from src.utils.browser import bypass_cloudflare, new_browser
from src.utils.consts import LOG_LEVEL from src.utils.consts import LOG_LEVEL
app = FastAPI(debug=True) app = FastAPI(debug=LOG_LEVEL == logging.DEBUG, log_level=LOG_LEVEL)
@app.get("/") @app.get("/")

View File

@ -3,7 +3,7 @@ import os
from pathlib import Path from pathlib import Path
LOG_LEVEL = os.getenv("LOG_LEVEL") or "INFO" LOG_LEVEL = os.getenv("LOG_LEVEL") or "INFO"
LOG_LEVEL = logging.getLevelName(LOG_LEVEL.upper()) LOG_LEVEL = logging.getLevelNamesMapping()[LOG_LEVEL.upper()]
CHALLENGE_TITLES = [ CHALLENGE_TITLES = [
# Cloudflare # Cloudflare