Scrape GitHub to get user emails
Project description
GitHub Email Scraper
Scrape GitHub for email addresses associated with a username. Search through public events and commits in the user's repositories.
Requirements
- Python 3
- Requests (
pip3 install requests
)
Installation
PIP
pip install github-email-scraper
Manual install
pip install -r requirements.txt
python setup.py install
orpip install .
Standalone
Just run the github_email_scraper.py
script in the github_email_scraper directory.
Usage
Specify a username with -u
or a file containing usernames (one per line) with -U
. Choose to either search commits (--commits
), events (--events
), or both (--all
).
Installed
github-email-scraper -u USERNAME --all
Standalone
python github_email_scraper.py -u USERNAME --all
Full usage
usage: github_email_scraper.py [-h] (-u USER | -U USER_LIST) [-c] [-e] [-a] [-o] [-n] [-r] [-l AUTH_USER] [-t TOKEN]
Scrape GitHub for email addresses associated with a username. Choose to search through public events (--events), commits in the user's repositories
(--commits), or both (--all). Specify users on the command line (-u) or load a file with one user per line (-U).
optional arguments:
-h, --help show this help message and exit
-u USER, --user USER Target GitHub username
-U USER_LIST, --user-list USER_LIST
File containing list of target GitHub usernames, or - for stdin
-c, --commits Look through user's commits in their repos
-e, --events Look through user's public events
-a, --all Commits and events
-o, --other-users Include emails from commits not associated with the GitHub user. This may find other email addresses beloning to the user that they haven't manually associated with their GitHub account, but may also contain a lot of emails from other accounts if the repo is a fork or has multiple contributors.
-n, --name Show commit/event author name
-r, --repo Show repo the email was (first) found in
-l AUTH_USER, --auth-user AUTH_USER
Your GitHub username to use for authentication; use with --token
-t TOKEN, --token TOKEN
Your GitHub personal access token; use with --auth-user
Increasing your rate limit
GitHub limits the number of unauthenticated API requests per IP address. To get around this, create a personal access token on GitHub under your user's Settings -> Developer settings -> Personal access tokens. It does not need any scopes. Then use it in this program by setting --auth-user YOUR_GH_USERNAME --token YOUR_TOKEN
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file github-email-scraper-1.0.0.tar.gz
.
File metadata
- Download URL: github-email-scraper-1.0.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8197751baccf3f123497b838178ec4217c2d5ede04615279a1f4066221df4a2 |
|
MD5 | c26efa4e39e3b534adc1065d46552fe5 |
|
BLAKE2b-256 | 922b102a5bc27603448c9eb88360482f8e263525a315633a358c5be953e3b3bb |
File details
Details for the file github_email_scraper-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: github_email_scraper-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0757459d20fd12165593f1e5384738676f8a6f554cde0db5288b9a0cec3826b |
|
MD5 | 5796f036868344a4ddad2eb7d7764b44 |
|
BLAKE2b-256 | 7e9dd1c955b654847111a994255e03a8f7e98c5c22db81b470a7e3ae069e46c9 |