@@ -0,0 +1,1548 @@
+#!/usr/bin/env python3%0A# encoding: utf-8%0A%0A%22%22%22%0AFigure out the email of a github user.%0A%0ASteps from here: http://www.eremedia.com/sourcecon/how-to-find-almost-any-github-users-email-address/%0AProtection tips: https://help.github.com/articles/keeping-your-email-address-private/%0A%0AAuthor:%0A%0ALaszlo Szathmary, alias Jabba Laci, 2016%0Ajabba.laci@gmail.com%0A%22%22%22%0A%0Aimport re%0Aimport sys%0A%0Aimport requests%0A%0AURL = %22https://api.github.com/users/%7Bname%7D/events/public%22%0A%0A%0Adef get_input():%0A    try:%0A        inp = input(%22Github info (username or repo. link): %22).strip()%0A        if inp:%0A            if '/' not in inp:%0A                return inp%0A            # else:%0A            m = re.search(r'github.com/(%5B%5E/%5D+)', inp)%0A            if m:%0A                return m.group(1)%0A            else:%0A                print('Invalid input.')%0A        else:%0A            print('Invalid input.')%0A    except (KeyboardInterrupt, EOFError):%0A        print()%0A        print('aborted.')%0A        sys.exit(1)%0A%0A%0Adef extract_email(name):%0A    url = URL.format(name=name)%0A    li = requests.get(url).json()%0A    try:%0A        for d in li:%0A            if d%5B'type'%5D == 'PushEvent':%0A                return d%5B'payload'%5D%5B'commits'%5D%5B0%5D%5B'author'%5D%5B'email'%5D%0A    except TypeError:%0A        return None%0A%0A    return None%0A%0A%0Adef main():%0A    username = get_input()%0A    email = extract_email(username)%0A    if email:%0A        print(email)%0A    else:%0A        print(%22Error: the email couldn't be extracted.%22)%0A%0A##############################################################################%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

find out a github user's email