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 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)
|
||||||
|
|||||||
@ -100,9 +100,8 @@ async def dropoutDownload(
|
|||||||
background_tasks: BackgroundTasks,
|
background_tasks: BackgroundTasks,
|
||||||
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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user