Created
April 2, 2015 13:42
-
-
Save 0532/28550c2d9055670e2b84 to your computer and use it in GitHub Desktop.
python获取github 项目language
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
| # -*- coding: UTF-8 -*- | |
| import requests | |
| def getLang(user): | |
| re = requests.get('https://api.github.com/users/'+user+'/repos') | |
| if 200 == re.status_code: | |
| for k,v in enumerate(re.json()): | |
| print v['name'],v['language'] | |
| if __name__ == '__main__': | |
| getLang('0532') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment