From 7e83d92f4de6d4afd0f52453e3ac8c8e217f93f7 Mon Sep 17 00:00:00 2001 From: Silk Rose Date: Mon, 11 Mar 2024 10:03:51 -0400 Subject: [PATCH] Fix quotes in more places for fimfic stats --- fimficstats/fimfic-stats.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fimficstats/fimfic-stats.ts b/fimficstats/fimfic-stats.ts index 5f3c484..a80f356 100644 --- a/fimficstats/fimfic-stats.ts +++ b/fimficstats/fimfic-stats.ts @@ -38,7 +38,7 @@ async function mane() { const request_interval = 1000; // Loop over IDs to scrape data. - for (let id = 551751; id <= 553110; id++) { + for (let id = 1; id <= 2000; id++) { const start_time = Date.now(); let status = "unknown"; @@ -88,7 +88,7 @@ async function mane() { db.query( sql.insert_author( Number(api.data.relationships.author.data.id), - api.included[0].attributes.name, + format_quote_string(api.included[0].attributes.name), new Date(api.included[0].attributes.date_joined).getTime() / 1000, api.included[0].attributes.num_followers, api.included[0].attributes.num_blog_posts, @@ -135,7 +135,7 @@ async function mane() { .find("li") .each(function () { const [site, count] = document(this).text().split(": "); - referrals[site] = Number(count); + referrals[site] = Number(count.replace(/\D/g, "")); }); db.query(