
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
leetcode-query
Advanced tools
The API to get user profiles, submissions, and problems on LeetCode, with highly customizable GraphQL API and Rate Limiter.
leetcode.cn endpoint)Includes recent submissions and posts.
import { LeetCode } from "leetcode-query";
const leetcode = new LeetCode();
const user = await leetcode.user("username");
/*
// An Example for leetcode.cn endpoint
import { LeetCodeCN } from "leetcode-query";
const leetcodeCN = new LeetCodeCN();
const user = await leetcodeCN.user("leetcode");
*/
import { LeetCode, Credential } from "leetcode-query";
const credential = new Credential();
await credential.init("YOUR-LEETCODE-SESSION-COOKIE");
const leetcode = new LeetCode(credential);
console.log(await leetcode.submissions({ limit: 10, offset: 0 }));
You can use your own fetcher, for example, fetch through a real browser.
import { LeetCode, fetcher } from "leetcode-query";
import { chromium } from "playwright-extra";
import stealth from "puppeteer-extra-plugin-stealth";
// setup browser
const _browser = chromium.use(stealth()).launch();
const _page = _browser
.then((browser) => browser.newPage())
.then(async (page) => {
await page.goto("https://leetcode.com");
return page;
});
// use a custom fetcher
fetcher.set(async (...args) => {
const page = await _page;
const res = await page.evaluate(async (args) => {
const res = await fetch(...args);
return {
body: await res.text(),
status: res.status,
statusText: res.statusText,
headers: Object.fromEntries(res.headers),
};
}, args);
return new Response(res.body, res);
});
// use as normal
const lc = new LeetCode();
const daily = await lc.daily();
console.log(daily);
await _browser.then((browser) => browser.close());
Documentation for this package is available on https://jacoblincool.github.io/LeetCode-Query/.
FAQs
Get user profiles, submissions, and problems on LeetCode.
The npm package leetcode-query receives a total of 1,696 weekly downloads. As such, leetcode-query popularity was classified as popular.
We found that leetcode-query demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.