New keyword, prevent duplication

This commit is contained in:
bingus_violet 2024-12-24 03:30:45 -06:00
parent b39eccef61
commit 6dc65275a2
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
import * as path from "path"
import { fileURLToPath } from "url"
export const flavors = ["#reflectivedetective", "#alearfred"]
export const flavors = ["#reflectivedetective", "#alearfred", "リュアル"]
export const variety = 200
export const PORT = process.env.PORT || 8080
export const __dirname = path.dirname(fileURLToPath(import.meta.url))

View file

@ -13,7 +13,9 @@ export async function scrapeYaoi() {
var search = scraper.searchTweets(flavor, variety, "media")
for await (var value of search) {
if (value.html.includes("img")) {
// console.log(finalArray.includes(value))
if (value.html.includes("img") & !finalArray.includes(value)) {
// console.log(value)
finalArray.push(value)
}
}