fix component. Add flags.

This commit is contained in:
Jordan
2025-01-24 06:25:37 -08:00
parent 8cc1048251
commit 0c9daf8e4a
17 changed files with 334 additions and 33 deletions

18
scripts/captureTheFlag.ts Normal file
View File

@ -0,0 +1,18 @@
import {load} from "cheerio"
const QUERY = "ISO3166-1";
const PAGE = `https://openclipart.org/tag/${QUERY}`;
async function capture() {
for (let i = 1; i <= 1; ++i) {
const url = i > 1 ? PAGE + `?p=${i}?q=${QUERY}` : PAGE;
const data = await fetch(url);
const $ = load(await data.text());
const links = $("document").find("a");
console.log("%d links", links.length)
}
}
(async () => {
await capture()
})();