Parsing and running
This commit is contained in:
53
main.ts
53
main.ts
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user