From 573cd98ee1a5367fa1947da3c1d025cb09ea4841 Mon Sep 17 00:00:00 2001 From: hazy Date: Sun, 1 May 2022 22:27:16 -0500 Subject: [PATCH] use all types of titles --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index e86b6d9..6095efe 100644 --- a/index.js +++ b/index.js @@ -33,7 +33,7 @@ function random(chars, length = 8) { } function titleGen(category) { - category = category??Math.round(Math.random()*20) + category = category??Math.round(Math.random()*6) let title switch (category) { case 0: @@ -77,7 +77,7 @@ function shuffleArray(array) { async function writeList(count) { let found = [] for (let i = 0; i < count; i++) { - let title = titleGen(10) + let title = titleGen() let items = (await ytsr(title, { pages: 1 })).items let fewViews = items.filter(e => { return e.type=='video'&&e.views<10