井戸端の底500件をnode.jsで取得
code:index.js
//@ts-check
const fs = require("fs").promises;
const main = async () => {
const pgcountjsonr = await fetch(
);
const pgcountjson = await pgcountjsonr.json();
const pgcount = pgcountjson"count"; let pglist = [];
const pglisttempjsonr = await fetch(
https://scrapbox.io/api/pages/villagepump/?limit=500&skip=${pgcount - 500}
);
const pglisttempjson = await pglisttempjsonr.json();
pglisttempjson"pages".forEach((e) => { });
await fs.writeFile("villagepump.txt", pglist.join("\n"));
};
main();
code:package.json
{
"name": "villagepumpsoko",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node ."
},
"keywords": [],
"author": "bsahd",
"license": "MIT",
"description": "get a **soko of pages** of villagepump."
}