feat: add ability to scrape youtube video

This commit is contained in:
2023-08-02 15:56:33 +02:00
parent cebbb8af2b
commit ba853342bd
10 changed files with 193 additions and 36 deletions

View File

@@ -55,8 +55,12 @@ export async function extractAuthorName(content: string) {
const author = chatCompletion.choices[0].message.content;
if (author !== "not found") return author;
return "";
if (
author?.toLowerCase().includes("not") &&
author?.toLowerCase().includes("found")
) return "";
return author;
}
export async function createTags(content: string) {