Beispiel #1
0
import json
from linkedin_api import Linkedin

with open('credentials.json', 'r') as f:
    credentials = json.load(f)

if credentials:
    linkedin = Linkedin(credentials['username'], credentials['password'])

    profile = linkedin.get_profile('ACoAABQ11fIBQLGQbB1V1XPBZJsRwfK5r1U2Rzw')
    profile['contact_info'] = \
        linkedin.get_profile_contact_info('ACoAABQ11fIBQLGQbB1V1XPBZJsRwfK5r1U2Rzw')
    connections = linkedin.get_profile_connections(profile['profile_id'])
Beispiel #2
0
from linkedin_api import Linkedin
from getpass import getpass
import json

email = input("Please input the email you use to log into LinkedIn:\n")
password = getpass("Please input your LinkedIn password: \n")
api = Linkedin(email, password)

pid = input("Please input your LinkedIn public profile id: \n")
profile = api.get_profile(pid)
uid = profile["profile_id"]

publicIds = {pid}
links = []

connections = api.get_profile_connections(uid)
numberOfConnections = len(connections)
index = 0

for connection in connections:
    index += 1
    print("downloading connection " + str(index) + " of " +
          str(numberOfConnections))

    if (index == 50):
        break

    firstPublicId = connection["public_id"]
    publicIds.add(connection["public_id"])
    links.append({"source": pid, "target": firstPublicId})
import urllib
import requests
import json
from linkedin_api import Linkedin

if __name__ == '__main__':

    api = Linkedin('*****@*****.**', 'DelhiBelly11#Snatch00')
    profile = api.get_profile('venkata-ratnadeep-suri')
    contact_info = api.get_profile_contact_info('venkata-ratnadeep-suri')
    connections = api.get_profile_connections('venkata-ratnadeep-suri')

    with open('venkata-ratnadeep-suri.txt', 'w') as p:
        json.dump(profile, p)

    with open('venkata-ratnadeep-suri', 'w') as c:
        json.dump(contact_info, c)

    with open('venkata-ratnadeep-suri', 'w') as connect:
        json.dump(connections, connect)
Beispiel #4
0
import json
from linkedin_api import Linkedin

with open("credentials.json", "r") as f:
    credentials = json.load(f)

if credentials:
    linkedin = Linkedin(credentials["username"], credentials["password"])

    profile = linkedin.get_profile("ACoAABQ11fIBQLGQbB1V1XPBZJsRwfK5r1U2Rzw")
    profile["contact_info"] = linkedin.get_profile_contact_info(
        "ACoAABQ11fIBQLGQbB1V1XPBZJsRwfK5r1U2Rzw")
    connections = linkedin.get_profile_connections(profile["profile_id"])