Scrape the GitHub website and retrieve several page details with Json output.
Tech :
Module :
from Github import Github
username = "Username Github"
result = Github(username).user()
print(result)
Retrieve all account information, not including email and password.
/user/<username>
Output :
{
"status": true,
"username": "Account Username",
"avatar_url": "Account Avatar URL",
"name": "Account Name",
"company": "Account Company Name",
"blog": "Account Blog URL",
"location": "Account Location",
"bio": "Account Bio",
"repositories": "Total Account Repository",
"projects": "Total Account Projects",
"packages": "Total Account Packages",
"stars": "Total Account Stars",
"followers": "Total Account Followers",
"following": "Total Account Following",
"social": [
"Account Social Links"
]
}
Take a list of repositories on account.
/user/<username>/repos
Output :
[
{
"status": true,
"title": "Repository Title",
"url": "Repository URL",
"description": "Repository Description",
"language": "Repository Language",
"tags": [
"Repository Tags"
],
"stars": "Total Repository Stars",
"forks": "Total Repository Forks",
"date_info": "Time created Repository"
}
]
Take a list of followers on account.
/user/<username>/followers
Output :
[
{
"status": true,
"avatar_url": "Followers Avatar URL",
"username": "Followers Username",
"name": "Followers Name",
"bio": "Followers Bio",
"company": "Followers Company Name",
"location": "Followers Location"
}
]
Take a list of following on account.
/user/<username>/following
Output :
[
{
"status": true,
"avatar_url": "Following Avatar URL",
"username": "Following Username",
"name": "Following Name",
"bio": "Following Bio",
"company": "Following Company Name",
"location": "Following Location"
}
]
Take a list of stars on account.
/user/<username>/stars
Output :
[
{
"status": true,
"username": "Username Repository Author",
"repository": "Repository Title",
"description": "Repository Description",
"stars": "Repository Stars",
"forks": "Repository Forks",
"language": "Repository Language",
"date_info": "Time created Repository"
}
]
Retrieve all repository information on account.
/repository/<username>/<repository>
Output :
{
"status": true,
"thumbnail_url": "Repository Thumbnail URL",
"title": "Repository Title",
"description": "Repository Description",
"url": "Repository URL External",
"stars": "Total Repository Stars",
"forks": "Total Repository Forks",
"issues": "Total Repository Issues",
"pull_requests": "Total Repository Pull Requests",
"projects": "Total Repository Projects",
"releases": "Total Repository Releases",
"contributors": "Total Repository Contributors",
"tags": [
"Repository Tags"
],
"language": [
"Repository Language"
]
}
Take the repository star list on account.
/repository/<username>/<repository>/stars
Output :
[
{
"status": true,
"avatar_url": "Account Avatar URL",
"username": "Account Username",
"text": "Account Company Name or Join Date"
}
]
Take the repository fork list on account.
/repository/<username>/<repository>/forks
Output :
[
{
"status": true,
"avatar_url": "Account Avatar URL",
"username": "Account Username",
"repository": "Account Name",
"stars": "Total Stars Repository Forks",
"forks": "Total Forks Repository",
"issues": "Total Issues Repository Forks",
"pulls": "Total Pull Requests Repository Forks",
"created_at": "Time created Repository Forks",
"updated_at": "Time updated Repository Forks"
}
]
Linking css or javascript files via CDN to your website, linked to files on the repository of the github account.
/cdn/<username>/<repository>/<branch>/<file_path>
Output :
The result of the code file.