-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
2,107 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import requests | ||
import csv | ||
import time | ||
import json | ||
import pandas as pd | ||
import sys | ||
|
||
|
||
""" | ||
This script will allow you to enter the EIN's as strings into the list called | ||
charities so it is added to a file called go.txt found in the same folder | ||
as this file. | ||
Things to look out for: | ||
- the EIN's must be strings | ||
- the Subscription key is a trial key and there are rougly 130 calls left | ||
- there must already be a file called go.txt (or whatever you choose in | ||
the same folder as this file) | ||
- The API will only allow for about 5 calls for every 30 seconds | ||
E - Name | ||
F - EIN | ||
CT-CU - Total revenue: | ||
CV - Contributions: | ||
CW - Gov't grants: | ||
CX - Program services: | ||
CY - Investments: | ||
CZ - Special events: | ||
DA - Sales: | ||
DB - Other: | ||
DY - Total expenses: | ||
DE - Program services: | ||
DD - Administration: | ||
DF - Fundraising: | ||
""" | ||
|
||
charities = ["enter charity EIN's here or read from CSV"] | ||
|
||
def charToJson(): | ||
|
||
counter = 1 | ||
|
||
for x in charities: | ||
organization_id = x | ||
|
||
response = requests.get(f"https://apidata.guidestar.org/premier/v3/{organization_id}", | ||
headers={ | ||
"Subscription-Key": "secret" | ||
} | ||
) | ||
|
||
with open("go2.txt", "a") as myfile: | ||
myfile.write(response.text) | ||
|
||
counter += 1 | ||
|
||
if (counter%5 == 0): | ||
time.sleep(30) | ||
|
||
|
||
""" | ||
Inputting a JSON file to https://json-csv.com/ will manually parse through the CSV | ||
- Currently testing ways to complete this step with pandas | ||
""" | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import rocketreach | ||
from linkedin_scraper import Person, actions | ||
from selenium import webdriver | ||
|
||
# Teri Williams - OneUnited Bank (No Teri Williams, but Teri Cohee) - id=3609442 | ||
# Farrah Belizaire - LiteWork Events (Doesn't show up when company included) - id=1259121 | ||
# Terryl Calloway - Calloway Graphix (2 Results with name and current employer, who?) | ||
# Herby Duverne - Windwalker Group (Wrong Corp name - Windwalker Corporation, also accent on e) | ||
|
||
# Finds the person through search | ||
# Search and Lookup result documentation: | ||
# https://github.com/rocketreach/rocketreach_python/blob/master/rocketreach/person.py | ||
rr = rocketreach.Gateway(rocketreach.GatewayConfig('apikey')) | ||
|
||
# # Code for Searches (does not return linkedin link) | ||
s = rr.person.search().filter(name="") | ||
result = s.execute() | ||
for person in result.people: | ||
print(person) | ||
|
||
# Code for lookups | ||
f = open("info.txt","w") | ||
result = rr.person.lookup(person_id=id) | ||
if result.is_success: | ||
person = result.person | ||
f.write("ID: "+ person.id) | ||
f.write("Name: "+ person.name) | ||
f.write("Employer: "+ person.current_employer) | ||
f.write("LinkedIn: "+ person.linkedin_url) | ||
# linkedin_urls.append(person.linkedin_url) | ||
|
||
|
||
# LinkedIn Scraper | ||
driver = webdriver.Chrome() | ||
linkedin_urls = ["https://www.linkedin.com/in/teri-williams-cohee-99811029"] | ||
actions.login(driver, "username", "password") | ||
linkedin_person = Person(linkedin_urls[0], driver=driver,scrape=False) | ||
linkedin_person.scrape(close_on_complete=False) | ||
print(linkedin_person) |
Binary file not shown.