From 71f6dbd1782a86bf3e1e827a6951b2527afc3498 Mon Sep 17 00:00:00 2001 From: Lucas Larson Date: Wed, 26 Jul 2023 16:36:15 -0400 Subject: [PATCH] fix: find pre-2007 activity Signed-off-by: Lucas Larson --- source/plugins/achievements/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/achievements/index.mjs b/source/plugins/achievements/index.mjs index 25465b32109..c0c1f3db2f9 100644 --- a/source/plugins/achievements/index.mjs +++ b/source/plugins/achievements/index.mjs @@ -82,7 +82,7 @@ async function total({imports}) { //Extracting total from github.com/search for (let i = 0; (i < 100) && ((!total.users) || (!total.repositories)); i++) { const page = await browser.newPage() - await page.goto("https://github.com/search?q=+created%3A%3E2007") + await page.goto("https://github.com/search?q=created%3A%3E%3D1970") const results = await page.evaluate(() => [...[...document.querySelectorAll("h2")].filter(node => /Filter by/.test(node.innerText)).shift()?.nextSibling?.innerText.trim().matchAll(/(?Repositories|Users|Issues)\n(?.*?)M/g) ?? []]) ?? null for (const result of results) { const type = result[1]?.toLowerCase()