PatriceParis / GitHub-Email-Scraper

A quick ruby script to get the public emails of people who have shown interest in a github project or user. Please use responsibly.


This is a quick ruby script to get public emails of contributors, watchers, stargazers, and forkers of all repos for a user/organization. Please use responsibly and respect those who wish to opt out of your email communications.

Developed using ruby 2.1, however should run successfully with similar versions of ruby.

Gems required: Github_API

Usage:

Before using the script, change USERNAME and PASSWORD in login.rb to a set of valid github login credentials for authentication. This allows for 5000 API calls per hour as opposed to the default 60, which will not be enough due to the branching nature of this script.

This script takes a user or organization as a command line argument and an optional 0 or 1 to indicate whether output is printed or written to a local .txt. No second argument or a 0 will print, and a 1 will write to csv.

Printed output: ruby ruby scraper.rb myorganization ruby scraper.rb myorganization 0

Output to file: ruby ruby scraper.rb myorganization 1

Contributors thrasr

Last run failed with status code 1.

Console output of last run

<internal:lib/rubygems/custom_require>:29:in `require' : no such file to load -- github_api (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from /repo/scraper.rb:1:in `<main>'

Statistics

Total run time: less than 5 seconds

Total cpu time used: less than 5 seconds

Total disk space used: 27.6 KB

History

  • Manually ran revision 4d50e573 and failed .
    nothing changed in the database
  • Created on morph.io

Scraper code

Ruby

GitHub-Email-Scraper / scraper.rb