diff --git a/constants.js b/constants.js index 6f4af83..306910e 100644 --- a/constants.js +++ b/constants.js @@ -1,8 +1,8 @@ import * as path from "path" import { fileURLToPath } from "url" -export const flavors = ["#reflectivedetective", "#alearfred", "リュアル"] -export const variety = 200 +export const flavors = [["#reflectivedetective"], ["#alearfred", "リュアル"]] +export const variety = 5 export const PORT = process.env.PORT || 8080 export const __dirname = path.dirname(fileURLToPath(import.meta.url)) export const staticPath = path.join(__dirname, "static") \ No newline at end of file diff --git a/scraper.js b/scraper.js index be7147b..7406b04 100644 --- a/scraper.js +++ b/scraper.js @@ -8,15 +8,17 @@ await scraper.login(process.env.USERNAME, process.env.PASSWORD) export async function scrapeYaoi() { var finalArray = [] - for (let flavor of flavors) { - console.log(flavor) - var search = scraper.searchTweets(flavor, variety, "media") - - for await (var value of search) { - // console.log(finalArray.includes(value)) - if (value.html.includes("img") & !finalArray.includes(value)) { - // console.log(value) - finalArray.push(value) + for (let typeIndex in flavors) { + let types = flavors[typeIndex] + finalArray[typeIndex] = [] + for (let flavor of types) { + // console.log(flavor) + var search = scraper.searchTweets(flavor, variety, "media") + + for await (var value of search) { + if (value.html.includes("img") & !finalArray.includes(value)) { + finalArray[typeIndex].push(value) + } } } } @@ -26,6 +28,7 @@ export async function scrapeYaoi() { export var yaoiList = await scrapeYaoi() export function getYaoi() { var yaoi = yaoiList[Math.floor(Math.random() * yaoiList.length)] + yaoi = yaoi[Math.floor(Math.random() * yaoi.length)] return yaoi } \ No newline at end of file diff --git a/static/style.css b/static/style.css index be5b313..24c732e 100644 --- a/static/style.css +++ b/static/style.css @@ -74,7 +74,7 @@ a { font-weight: bold; background-clip: text; - -webkit-text-fill-color: transparent; + color: transparent; transition: transform 2s cubic-bezier(0.075, 0.82, 0.165, 1); }