logging test
This commit is contained in:
parent
f4b4a09a8b
commit
06889cc413
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user