New keyword, prevent duplication
This commit is contained in:
parent
b39eccef61
commit
6dc65275a2
2 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
import * as path from "path"
|
import * as path from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
|
|
||||||
export const flavors = ["#reflectivedetective", "#alearfred"]
|
export const flavors = ["#reflectivedetective", "#alearfred", "リュアル"]
|
||||||
export const variety = 200
|
export const variety = 200
|
||||||
export const PORT = process.env.PORT || 8080
|
export const PORT = process.env.PORT || 8080
|
||||||
export const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
export const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||||
|
|
|
@ -13,7 +13,9 @@ export async function scrapeYaoi() {
|
||||||
var search = scraper.searchTweets(flavor, variety, "media")
|
var search = scraper.searchTweets(flavor, variety, "media")
|
||||||
|
|
||||||
for await (var value of search) {
|
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)
|
finalArray.push(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue