find_github_email
fixed python2 unicode emails error
แอปพลิเคชัน•การติดตั้ง•วิธีใช้•วิธีการทำงาน•มีส่วนร่วม
ติดตั้งแพ็คเกจใช้แพ็คเกจ Manager Pip
Python2
pip install find-github-emailหรือ
python -m pip install find-github-emailPython3
pip3 install find-github-emailหรือ
python3 -m pip install find-github-emailเผชิญกับปัญหา? ตรวจสอบส่วนปัญหาหรือเปิดปัญหาใหม่
Python2 run.py
# python sample code to use "find_github_email" package
# import package
import find_github_email
# read GitHub username from user
username = raw_input ( " n Enter GitHub username: " )
response = find_github_email . find ( username )
print " n " , response , " n "Python3 run.py
# python3 sample code to use "find_github_email" package
# import package
import find_github_email
# read GitHub username from user
username = input ( " n Enter GitHub username: " )
response = find_github_email . find ( username )
print ( f" n { response } n " )เผชิญกับปัญหา? ตรวจสอบส่วนปัญหาหรือเปิดปัญหาใหม่
รหัสทำงานอย่างไร:
case 1 :
- locate users's non-forked repo
- for that repo, scrape commits json object and iterate over each commit
- for each commit, the commit URL will become: https://github.com/username/public_repo/commit/commit_id
- option 1: append ".patch" to URL so it becomes https://github.com/username/public_repo/commit/commit_id.patch
- option 2: looks for author json object
- then simply filter email from author object.
case 2 :
- check if the user has a commit in public repo using: https://api.github.com/users/{username}/events/public
- then iterate over each payload, for each payload scrape it's commits, iterate over each commit and filter email.
- If so grep email from there.
Package Pypi Project: Find-Github-Email
โครงสร้างแพ็คเกจ:
.
├── LICENSE
├── README.md
├── dist
│ └── find_github_email-1.2.5.tar.gz
├── find_github_email
│ ├── __init__.py
│ ├── __init__.pyc
│ ├── __pycache__
│ │ ├── __init__.cpython-37.pyc
│ │ └── main.cpython-37.pyc
│ ├── main.py
│ └── main.pyc
├── find_github_email.egg-info
│ ├── PKG-INFO
│ ├── SOURCES.txt
│ ├── dependency_links.txt
│ ├── requires.txt
│ └── top_level.txt
├── py2-run.py
├── requirements.txt
├── run.py
├── setup.py
└── svgs
├── py2install.svg
├── py3install.svg
└── run.svg
5 directories, 21 files
ยินดีต้อนรับคำขอดึง สำหรับการเปลี่ยนแปลงครั้งใหญ่โปรดเปิดปัญหาก่อนเพื่อหารือเกี่ยวกับสิ่งที่คุณต้องการเปลี่ยน/แก้ไข
มิกซ์
แหล่งที่มา