Adr740's picture
Update linkedin.py
b4c57f7 verified
raw
history blame contribute delete
758 Bytes
import requests
import json
from config import proxycurl_api
def get_linkedin_profile(name, folder_path="."):
print(f"Aspiring {name}'s linkedin soul...")
api_key = proxycurl_api
headers = {'Authorization': 'Bearer ' + api_key}
api_endpoint = 'https://nubela.co/proxycurl/api/linkedin/company/resolve'
params = {
'company_name': name,
'enrich_profile': 'enrich',
'extra' : 'include'
}
response = requests.get(api_endpoint,
params=params,
headers=headers)
content = response.json()
file_path = f"linkedin_content.json"
# Write the JSON data to the file
with open(file_path, "w") as file:
json.dump(content, file)
return content