logging test

This commit is contained in:
TylerCG 2025-05-12 16:27:49 -04:00
parent f4b4a09a8b
commit 06889cc413
2 changed files with 8 additions and 10 deletions

View File

@ -2,12 +2,12 @@ import os, yt_dlp, json, requests, re, logging
from bs4 import BeautifulSoup
from urllib.parse import urlsplit
# # Setup logging
# logging.basicConfig(
# filename='/data/logs/syllabus.log',
# level=logging.INFO,
# format='%(asctime)s - %(levelname)s - %(message)s'
# )
# Setup logging
logging.basicConfig(
filename='/data/logs/syllabus.log',
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger(__name__)
@ -95,7 +95,6 @@ class grab():
class dropout():
def show(show, season, episode_start):
logger.info(f'Received download request for: {show}')
directory = f'/tv/{show}/Season {season}/'
if not os.path.exists(directory):
os.makedirs(directory)

View File

@ -100,9 +100,8 @@ async def dropoutDownload(
background_tasks: BackgroundTasks,
show: str = Form(...),
season: int = Form(...)
):
# data = await request.json()
# logger.info(f"Parsed JSON Body: {json.dumps(data, indent=2)}")
):
logger.info(f'Received download request for: {show}')
try:
background_tasks.add_task(download.dropout.show,show,season,None)
# download.dropout.show(show,season,episode)