0

I am new to Github programming. I'd like to get user details who are in github by giving the username as input. How do I do that using pygithub?

Also how do I get their profile photo too?

Thank you

3
  • You can learn the module here Commented Aug 1, 2018 at 18:13
  • specifically pygithub.readthedocs.io/en/latest/github_objects/… Commented Aug 1, 2018 at 18:17
  • Thank you.. I give the command >>>a=github.Github() >>> a.get_user("github.com/xxxxx") It shows the error " raise self.__createException(status, responseHeaders, output) github.GithubException.UnknownObjectException: 404 {u'documentation_url': u'developer.github.com/v3', u'message': u'Not Found'}" What to do..Thank you Commented Aug 1, 2018 at 18:37

1 Answer 1

1

https://help.github.com/en/articles/searching-users

This link has the syntax for searching users information

Import github
g=github.Github()
users=g.search_users(str(username)+" in:login")

You can refer the formate and use it in python like this This search_users function returns all the information about the user which are available in public.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.