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

View File

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