-
A simple tool to fetch user details of a GitHub profile.
-
It is built on top of GitHub API v3.
-
Data is stored and manipulated in form of JSON.
-
The data which can be grouped into 3 types, each with a different program and a python class.
-
User Data that contains user stats such 'Name', 'Location', 'Email', 'Followers' etc. Also stores a Repository list of the user.
-
Repo Data is used to collect data about a particular repository, such as 'number of forks', 'number of commits' etc.
-
Commit Data can be used to scrape commit history and 'Sha' values along with commit message.
-
To get started clone this repository first
git clone https://github.com/AvikantSrivastava/GitHub-Profile-Scraper.git
To get user details import user.py
in your project.
from user import User
user = User('Username here')
# to get user stats and save in json format
UserData = user.get_user_stats()
print(UserData)
# to get repository list and save in json format
RepoData = user.get_repo_list()
print(RepoData)
To get repository details import repo.py
in your project.
from repo import Repo
repo = Repo('Repository name here')
# to get repository stats and save it in json format
RepoData = repo.get_repo_stats()
print(RepoData)
# to get a list of all the commit IDs and save them in json format
CommitIDs = repo.get_sha_values()
print(CommitIDs)
### Repository details
To get repository details import ```repo.py``` in your project.
To get Commit details import commit.py
in your project.
from commit import Commit
project = Commit('Username here', 'Repository name here','commit ID here')
# to get Commit stats and save them in json format
CommitData = project.get_commit_stats()
print(CommitData)
- Make a Driver program [CLI/GUI].
- Add more formats such as CSV and YML.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature'
- Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
Distributed under the GPL-3.0 License. See LICENSE
for more information.
Avikant Srivastava - @Aestheticell - [email protected]
Project Link: https://github.com/AvikantSrivastava/GitHub-Profile-Scraper