Skip to content

AvikantSrivastava/GitHub-Profile-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Profile Scraper

Table of Contents

About the Project

  • 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.

Getting Started

Installation

To get started clone this repository first

git clone https://github.com/AvikantSrivastava/GitHub-Profile-Scraper.git

Usage

User details

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)

Repository details

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.

Commit details

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)

Goals

  • Make a Driver program [CLI/GUI].
  • Add more formats such as CSV and YML.

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
     git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  1. Open a Pull Request

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Avikant Srivastava - @Aestheticell - asdavikant@gmail.com

Project Link: https://github.com/AvikantSrivastava/GitHub-Profile-Scraper

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages