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

Vishak Raj
  • 83
  • 2
  • 10
  • You can learn the module [here](https://pygithub.readthedocs.io/en/latest/) – TheStrangeQuark Aug 01 '18 at 18:13
  • specifically https://pygithub.readthedocs.io/en/latest/github_objects/AuthenticatedUser.html – MatthewMartin Aug 01 '18 at 18:17
  • Thank you.. I give the command >>>a=github.Github() >>> a.get_user("https://github.com/xxxxx") It shows the error " raise self.__createException(status, responseHeaders, output) github.GithubException.UnknownObjectException: 404 {u'documentation_url': u'https://developer.github.com/v3', u'message': u'Not Found'}" What to do..Thank you – Vishak Raj Aug 01 '18 at 18:37

1 Answers1

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.