项目作者: fredysomy

项目描述 :
A simple 🐍 python package to scrape Github user repositories and some user details.
高级语言: Python
项目地址: git://github.com/fredysomy/gitscrpy.git
创建时间: 2020-11-14T05:46:40Z
项目社区:https://github.com/fredysomy/gitscrpy

开源协议:

下载


Gitscrpy

  • A python library to scrape github.
  • Simple to use syntax
  • Install using pip

Install

  1. pip install gitscrpy

Run

  1. from gitscrpy import getgit
  2. # Imports the package
  3. a=getgit.gitinit("fredysomy")
  4. # Initialize
  5. # User repository functions
  6. a.getrepo(n)
  7. # return the first n repos in the users repository list.
  8. a.getrepo(2)
  9. # [{'name': 'MarkdownIt', 'description': 'Efficient Code Editor to live render Markdown and save as Markdown,Html and Pdf +⚡ Instant Hosting in The Web.⚡', 'url': 'https://github.com/fredysomy/MarkdownIt', 'stars': '13'}, {'name': 'fredysomy', 'url': 'https://github.com/fredysomy/fredysomy', 'stars': '4'}]
  10. a.getrepo(1)
  11. # {'name': 'MarkdownIt', 'description': 'Efficient Code Editor to live render Markdown and save as Markdown,Html and Pdf +⚡ Instant Hosting in The Web.⚡', 'url': 'https://github.com/fredysomy/MarkdownIt', 'stars': '13'}
  12. # User details functions
  13. a.getuser("star")
  14. # Retrun no of stars user have
  15. # 172
  16. a.getuser("name")
  17. # Returns the name of the User
  18. # Fredy Somy
  19. a.getuser("u_name")
  20. # Returns the Username of the User
  21. # fredysomy
  22. a.getuser("follower")
  23. # Returns no of followers the User
  24. # 25
  25. a.getuser("following")
  26. # Returns the no of following the User
  27. # 60
  28. a.getuser("img")
  29. # Returns the link to the User avatar
  30. # https://hfsjdhfjshd.com