Created
August 2, 2019 20:52
-
-
Save Stankye/ddc2d90627465134ef515af770f007ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from github import Github # pip install github | |
# Github API Token | |
ACCESS_TOKEN= '' | |
# Github Users stars you want to hoard | |
githubUser = 'stankye' | |
# File name you want to save as | |
fileName = 'myStars.txt' | |
gh = Github(ACCESS_TOKEN) | |
def get_stars(): | |
f = open(fileName, "a") | |
result = gh.get_user(githubUser).get_starred() # get all of the starz | |
for repo in result: | |
print(repo.clone_url, file=f) # Change from clone_url if you want something else: https://developer.github.com/v3/repos/#list-user-repositories | |
f.close() | |
return | |
get_stars() | |
print('Finished: Files saved to: ' + fileName) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment