GitHub Profile
Parsen Sie die Profilseite eines GitHub-Benutzers oder einer Organisation in strukturiertes JSON mit Name, Bio, Followern, Following, öffentlichen Repos, angehefteten Repos und Organisationen.
API-Nutzung
Fügen Sie &scraper=github-profile zu einem Crawling API-Request hinzu. URL-kodieren Sie die Ziel-URL im url-Parameter.
curl 'https://api.crawlbase.com/?token=YOUR_TOKEN' \
--data-urlencode 'url=https://github.com/karpathy' \
--data-urlencode 'scraper=github-profile' -Gfrom crawlbase import CrawlingAPI
api = CrawlingAPI({'token': 'YOUR_TOKEN'})
res = api.get(
'https://github.com/karpathy',
{'scraper': 'github-profile'}
)
import json
data = json.loads(res['body'])const { CrawlingAPI } = require('crawlbase');
const api = new CrawlingAPI({ token: 'YOUR_TOKEN' });
const res = await api.get(
'https://github.com/karpathy',
{ scraper: 'github-profile' }
);
const data = JSON.parse(res.body);require 'crawlbase'
api = Crawlbase::API.new(token: 'YOUR_TOKEN')
res = api.get('https://github.com/karpathy', scraper: 'github-profile')
data = JSON.parse(res.body)Beispiel-Eingabe-URL
Die im url-Parameter übergebene URL (zur besseren Lesbarkeit URL-dekodiert):
https://github.com/karpathyResponse-Struktur
JSON-Response-Body. Feldtypen können null sein, wenn die Quellseite den Wert nicht enthält.
Anzeigename.
Account-Login (der Profil-Slug).
Profil-Bio.
Kanonische Profil-URL.
Anzahl der Follower.
Anzahl der Following.
Anzahl der öffentlichen Repositorys, die im Repositories-Tab angezeigt wird.
Namen der angehefteten Repositorys.
Logins der auf dem Profil angezeigten Organisationen.
Beispiel-Response
{
"name": "Andrej",
"username": "karpathy",
"bio": "I like to train Deep Neural Nets on large datasets.",
"url": "https://github.com/karpathy",
"followers": 210000,
"following": 8,
"publicRepos": 63,
"pinnedRepos": ["nanoGPT", "nanochat", "llm.c", "llama2.c", "micrograd", "microgpt"],
"organizations": []
}