gfg-user-fetcher
v1.0.6
Published
A Node.js package that fetches GeeksForGeeks user profile, stats and solved problem details using Puppeteer.
Maintainers
Readme
🤖 gfg-user-fetcher
gfg-user-fetcher is a Node.js library that lets you easily fetch GeeksforGeeks (GFG) user profile details, statistics, and solved problems using Puppeteer. Access a user's coding progress and achievements programmatically with ease.
✨ Features
Fetch the following data from any public GeeksforGeeks profile:
👤 Profile Details
- Name (
name) - Profile Picture URL (
dp) - Current Title/Designation (
title)
📊 Coding Statistics
- Coding Score (
Coding Score) - Problems Solved (
Problems Solved) - Institute Rank (
Institute Rank) - Articles Published (
Articles Published) - Current POTD (Problem of the Day) Streak (
Current POTD Streak) - Longest POTD Streak (
Longest Streak) - Number of POTDs Solved (
POTDs Solved)
🧩 Solved Problems
- Problems categorized by difficulty:
schoolbasiceasymediumhard
🛠️ Installation
Requires Node.js. Install via npm or yarn:
npm install gfg-user-fetcher
# OR
yarn add gfg-user-fetcher
example usage
import getGFGDetails from "gfg-user-fetcher";
(async () => {
try {
// Replace 'username' with the actual GFG username you want to fetch
const data = await getGFGDetails("username");
console.log("GFG Profile Data:", data);
} catch (error) {
console.error("Error fetching GFG data:", error.message);
}
})();
Output
{
"problems": {
"school": [],
"basic": [],
"easy": [],
"medium": [],
"hard": []
},
"Coding Score": "",
"Problems Solved": "",
"Institute Rank": "",
"Articles Published": "",
"Current POTD Streak": "",
"Longest Streak": "",
"POTDs Solved": "",
"profile": {
"dp": "image_url",
"name": "",
"title": ""
}
}