Parsing and running

This commit is contained in:
Lukas Wölfer
2025-05-05 16:37:54 +02:00
parent 64979dfd18
commit 81ae6c81b4
2 changed files with 34 additions and 20 deletions

53
main.ts
View File

@@ -23,26 +23,39 @@ async function getWorkshopVideos(bot: Mwn): Promise<string[]> {
console.dir(await bot.parseTitle(files[0])) console.dir(await bot.parseTitle(files[0]))
} }
interface VideoDescription {
async function main() { teachers: string[]
const bot = new Mwn({ location: string
apiUrl: 'https://dancing.thasky.one/api.php', level: string
username: process.env.BOTNAME, date: string
patterns: string
password: process.env.BOTPW, notes: string
userAgent: 'mwn bot',
});
try {
await bot.login();
const relevantFiles = await getWorkshopVideos(bot)
} catch (error) {
console.error('Error:', error);
} finally {
await bot.logout();
}
} }
function parseSummary(description: string): VideoDescription {
}
async function main() {
const bot = new Mwn({
apiUrl: 'https://dancing.thasky.one/api.php',
username: process.env.BOTNAME,
password: process.env.BOTPW,
userAgent: 'mwn bot',
});
try {
await bot.login();
const relevantFiles = await getWorkshopVideos(bot)
} catch (error) {
console.error('Error:', error);
} finally {
await bot.logout();
}
}
main(); main();

1
run.sh Normal file
View File

@@ -0,0 +1 @@
deno run --env-file=.env --deny-read --allow-net=dancing.thasky.one:443 -E main.ts