Implement config file

This commit is contained in:
leesoh 2018-03-14 13:40:29 -06:00
parent 39b1ab20ed
commit fc46408052
3 changed files with 16 additions and 4 deletions

7
LinkedInt.cfg Normal file
View file

@ -0,0 +1,7 @@
[API_KEYS]
hunter =
[CREDS]
linkedin_username =
linkedin_password =

View file

@ -18,6 +18,7 @@ import subprocess
import json
import argparse
import cookielib
import ConfigParser
import os
import urllib
import math
@ -34,9 +35,11 @@ parser = argparse.ArgumentParser(description='Discovery LinkedIn')
parser.add_argument('-u', '--keywords', help='Keywords to search')
parser.add_argument('-o', '--output', help='Output file (do not include extentions)')
args = parser.parse_args()
api_key = "" # Hunter API key
username = "" # enter username here
password = "" # enter password here
config = ConfigParser.RawConfigParser()
config.read('LinkedInt.cfg')
api_key = config.get('API_KEYS', 'hunter')
username = config.get('CREDS', 'linkedin_username')
password = config.get('CREDS', 'linkedin_password')
def login():
cookie_filename = "cookies.txt"

2
requirements.txt Normal file
View file

@ -0,0 +1,2 @@
beautifulsoup4==4.6.0
thready==0.1.5