Improvements

This commit is contained in:
TylerCG 2025-04-23 23:14:43 -04:00
parent f7239a90f1
commit 5f8581d422
10 changed files with 579 additions and 15 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1 +1,3 @@
app/__pycache__
__pycache__
.DS_Store
data/*

6
.gitignore vendored
View File

@ -1 +1,5 @@
__pycache__
__pycache__
.DS_Store
data/*
# macOS
.DS_Store

21
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,21 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "FastAPI: Uvicorn",
"type": "debugpy",
"request": "launch",
"module": "uvicorn",
"args": [
"app.main:app",
"--reload"
],
"jinja": true,
"justMyCode": true,
"env": {
"PYTHONPATH": "${workspaceFolder}/app"
}
}
]
}

BIN
app/.DS_Store vendored

Binary file not shown.

0
app/__init__.py Normal file
View File

View File

@ -128,10 +128,6 @@ class youtube():
'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best',
}
try:
with yt_dlp.YoutubeDL(dl_ops) as ydl:
ydl.download([url])
# grab.thumbnail(ydl,url,location)
return JSONResponse(status_code=200, content={"status": "success", "message": "Download completed."})
except Exception as e:
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
with yt_dlp.YoutubeDL(dl_ops) as ydl:
ydl.download([url])
# grab.thumbnail(ydl,url,location)

View File

@ -1,8 +1,8 @@
from fastapi import FastAPI, Request
from fastapi.responses import HTMLResponse, JSONResponse
from fastapi.templating import Jinja2Templates
from fastapi.staticfiles import StaticFiles
from fastapi.concurrency import run_in_threadpool
# from fastapi.staticfiles import StaticFiles
# from fastapi.concurrency import run_in_threadpool
from pathlib import Path
import json, download
@ -21,9 +21,9 @@ async def dropoutUpdate():
except Exception as e:
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
@app.get("/dropoutSeries", response_class=JSONResponse)
@app.get("/dropoutSeries")
async def dropoutSeries():
file_path = Path("data/dropout.json")
file_path = Path("/data/dropout.json")
if file_path.exists():
with file_path.open("r", encoding="utf-8") as f:
data = json.load(f)
@ -40,10 +40,14 @@ async def dropoutDownload(show: str, season: str, episode: str = None):
@app.post("/ydl")
async def ydl(url: str, location: str):
download.youtube.ydl(url,location)
try:
download.youtube.ydl(url,location)
return JSONResponse(status_code=200, content={"status": "success", "message": "Download completed."})
except Exception as e:
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
# html
@app.get("/", response_class=HTMLResponse)
@app.get("/", include_in_schema=False, response_class=HTMLResponse)
async def index(request: Request):
apps = [
{"name": "Notes", "url": "/notes"},

531
dropout.json Normal file
View File

@ -0,0 +1,531 @@
[
{
"SHOW": "Adventuring Academy",
"URL": "https://www.dropout.tv/adventuring-academy",
"SEASONS": [
"1",
"2",
"3",
"4",
"5"
]
},
{
"SHOW": "Bad Internet",
"URL": "https://www.dropout.tv/bad-internet",
"SEASONS": [
"1"
]
},
{
"SHOW": "Breaking News No Laugh Newsroom",
"URL": "https://www.dropout.tv/breaking-news-no-laugh-newsroom",
"SEASONS": [
"1",
"2",
"3",
"4",
"5",
"6",
"7"
]
},
{
"SHOW": "Cartoon Hell",
"URL": "https://www.dropout.tv/cartoon-hell",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "Dimension 20",
"URL": "https://www.dropout.tv/dimension-20",
"SEASONS": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25"
]
},
{
"SHOW": "Dimension 20 A Court of Fey Flowers",
"URL": "https://www.dropout.tv/dimension-20-a-court-of-fey-flowers",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 A Crown of Candy",
"URL": "https://www.dropout.tv/dimension-20-a-crown-of-candy",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 A Starstruck Odyssey",
"URL": "https://www.dropout.tv/dimension-20-a-starstruck-odyssey",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Animated",
"URL": "https://www.dropout.tv/dimension-20-animated",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Audio Only",
"URL": "https://www.dropout.tv/dimension-20-audio-only",
"SEASONS": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25"
]
},
{
"SHOW": "Dimension 20 Burrow's End",
"URL": "https://www.dropout.tv/dimension-20-burrow-s-end",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Coffin Run",
"URL": "https://www.dropout.tv/dimension-20-coffin-run",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Dungeons And Drag Queens",
"URL": "https://www.dropout.tv/dimension-20-dungeons-and-drag-queens",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "Dimension 20 Escape From The Bloodkeep",
"URL": "https://www.dropout.tv/dimension-20-escape-from-the-bloodkeep",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Fantasy High",
"URL": "https://www.dropout.tv/dimension-20-fantasy-high",
"SEASONS": [
"1",
"2",
"3"
]
},
{
"SHOW": "Dimension 20 Fantasy High Junior Year",
"URL": "https://www.dropout.tv/dimension-20-fantasy-high-junior-year",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Leviathan",
"URL": "https://www.dropout.tv/dimension-20-leviathan",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Mentopolis",
"URL": "https://www.dropout.tv/dimension-20-mentopolis",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Misfits And Magic",
"URL": "https://www.dropout.tv/dimension-20-misfits-and-magic",
"SEASONS": [
"1",
"2",
"3"
]
},
{
"SHOW": "Dimension 20 Never Stop Blowing Up",
"URL": "https://www.dropout.tv/dimension-20-never-stop-blowing-up",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Neverafter",
"URL": "https://www.dropout.tv/dimension-20-neverafter",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Shriek Week",
"URL": "https://www.dropout.tv/dimension-20-shriek-week",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 The Ravening War",
"URL": "https://www.dropout.tv/dimension-20-the-ravening-war",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 The Seven",
"URL": "https://www.dropout.tv/dimension-20-the-seven",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 The Unsleeping City",
"URL": "https://www.dropout.tv/dimension-20-the-unsleeping-city",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "Dimension 20 Time Quangle",
"URL": "https://www.dropout.tv/dimension-20-time-quangle",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Tiny Heist",
"URL": "https://www.dropout.tv/dimension-20-tiny-heist",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20 Titan Takedown",
"URL": "https://www.dropout.tv/dimension-20-titan-takedown",
"SEASONS": [
"1"
]
},
{
"SHOW": "Dimension 20's Adventuring Party",
"URL": "https://www.dropout.tv/dimension-20-s-adventuring-party",
"SEASONS": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20"
]
},
{
"SHOW": "Dirty Laundry",
"URL": "https://www.dropout.tv/dirty-laundry",
"SEASONS": [
"1",
"2",
"3",
"4",
"69"
]
},
{
"SHOW": "Dropout Music",
"URL": "https://www.dropout.tv/dropout-music",
"SEASONS": [
"1"
]
},
{
"SHOW": "Erotic Clubhouse",
"URL": "https://www.dropout.tv/erotic-clubhouse",
"SEASONS": [
"1"
]
},
{
"SHOW": "Fantasy High Extra Credit",
"URL": "https://www.dropout.tv/fantasy-high-extra-credit",
"SEASONS": [
"1"
]
},
{
"SHOW": "Game Changer",
"URL": "https://www.dropout.tv/game-changer",
"SEASONS": [
"1",
"2",
"3",
"4",
"5",
"6",
"7"
]
},
{
"SHOW": "Game Changer Animated",
"URL": "https://www.dropout.tv/game-changer-animated",
"SEASONS": [
"1"
]
},
{
"SHOW": "Game Changer Battle Royale",
"URL": "https://www.dropout.tv/game-changer-battle-royale",
"SEASONS": [
"1"
]
},
{
"SHOW": "Gastronauts",
"URL": "https://www.dropout.tv/gastronauts",
"SEASONS": [
"1"
]
},
{
"SHOW": "Gods of Food",
"URL": "https://www.dropout.tv/gods-of-food",
"SEASONS": [
"1"
]
},
{
"SHOW": "Kingpin Katie",
"URL": "https://www.dropout.tv/kingpin-katie",
"SEASONS": [
"1"
]
},
{
"SHOW": "Kingpin Katie The Web Series",
"URL": "https://www.dropout.tv/kingpin-katie-the-web-series",
"SEASONS": [
"1"
]
},
{
"SHOW": "Make Some Noise",
"URL": "https://www.dropout.tv/make-some-noise",
"SEASONS": [
"1",
"2",
"3"
]
},
{
"SHOW": "Mice Murder",
"URL": "https://www.dropout.tv/mice-murder",
"SEASONS": [
"1"
]
},
{
"SHOW": "Monet's Slumber Party",
"URL": "https://www.dropout.tv/monet-s-slumber-party",
"SEASONS": [
"1"
]
},
{
"SHOW": "Nobody Asked",
"URL": "https://www.dropout.tv/nobody-asked",
"SEASONS": [
"1"
]
},
{
"SHOW": "Paranoia",
"URL": "https://www.dropout.tv/paranoia",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "Parlor Room",
"URL": "https://www.dropout.tv/parlor-room",
"SEASONS": [
"1"
]
},
{
"SHOW": "Play It By Ear",
"URL": "https://www.dropout.tv/play-it-by-ear",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "See Plum Run",
"URL": "https://www.dropout.tv/see-plum-run",
"SEASONS": [
"1"
]
},
{
"SHOW": "Smartypants",
"URL": "https://www.dropout.tv/smartypants",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "Thousandaires",
"URL": "https://www.dropout.tv/thousandaires",
"SEASONS": [
"1"
]
},
{
"SHOW": "Total Forgiveness",
"URL": "https://www.dropout.tv/total-forgiveness",
"SEASONS": [
"1"
]
},
{
"SHOW": "Total Forgiveness Early Payoff",
"URL": "https://www.dropout.tv/total-forgiveness-early-payoff",
"SEASONS": [
"1"
]
},
{
"SHOW": "Troopers 1",
"URL": "https://www.dropout.tv/troopers-1",
"SEASONS": [
"1"
]
},
{
"SHOW": "Troopers Animated",
"URL": "https://www.dropout.tv/troopers-animated",
"SEASONS": [
"1"
]
},
{
"SHOW": "Ultramechatron Team Go 1",
"URL": "https://www.dropout.tv/ultramechatron-team-go-1",
"SEASONS": [
"1"
]
},
{
"SHOW": "Um Actually",
"URL": "https://www.dropout.tv/um-actually",
"SEASONS": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10"
]
},
{
"SHOW": "Very Important People",
"URL": "https://www.dropout.tv/very-important-people",
"SEASONS": [
"1",
"2"
]
},
{
"SHOW": "What The Facts 101",
"URL": "https://www.dropout.tv/what-the-facts-101",
"SEASONS": [
"1"
]
},
{
"SHOW": "Where In The Eff Is Sarah Cincinnati",
"URL": "https://www.dropout.tv/where-in-the-eff-is-sarah-cincinnati",
"SEASONS": [
"1"
]
},
{
"SHOW": "Wtf 101",
"URL": "https://www.dropout.tv/wtf-101",
"SEASONS": [
"1"
]
}
]

6
dropout_cookies.txt Normal file
View File

@ -0,0 +1,6 @@
# Netscape HTTP Cookie File
# This file is generated by yt-dlp. Do not edit.
www.dropout.tv FALSE / FALSE 2376616194 locale_det en
.dropout.tv TRUE / TRUE 1777000194 _session UElXTTdFemwzenp3RTZPQWx6clJwN3d4WlFkaEV0SXVrd2tnMUNUazJQVldOZEVlVTNOS0ZXS2twUmFHczBuMUlSZXVmTmZIeEFUeFZlajVLRVhrT0VVcm9XYU1jMUZQcTQwQUJNUUhtZ091NWZGS0kwYkMyNmZQelkxbll2QmxXYTFwZlJKNVlmdXFnZkcrVVdld3FCaFB4QnJGb2FLTWxyNlBnOFNCSkNLd1EvTS9OaE1nbTgrcjNmSmR6bE9YLS11M2pSa2VBLzZNZkozeXBXWGF4amhRPT0%3D--9ff14eeca357a6d7d1e8eb3496b039a01b2f92ab
.www.dropout.tv TRUE / TRUE 1745465994 __cf_bm d9dI.ZmTB7AOvOULLAi6gzGen4gtP_wncSkUXNYGV18-1745464194-1.0.1.1-XU86MNGfB8sthsX_dgFr7z0XBFSuYt7yiI60jsNbL2WbD.SbKI57sVTLGBl8xYhDiD.bBN7pJRYJjKXKsn80n8C8RujDnn_55c_6rxwvcoo_pbexZbMpHbzcjc_SHxKH