为什么在使用likedin-api时get_profile_connections()返回空数组

时间:2018-12-22 14:55:17

标签: python api linkedin linkedin-api

所以我正在做一个学校项目,我应该在这个项目上获得我的LinkedIn连接并对其进行一些文本挖掘。我遇到了tomquirk (github) 提供的API项目,它正在正常运行,但是当我将项目移到另一台计算机时,它停止工作,现在当我尝试使用get_profile_connections()时,它总是返回一个空数组。我不知道问题出在哪里,希望我能在这里得到一些帮助。

这是我的代码:

from linkedin_api import Linkedin
api = Linkedin('linkedintestapi2@gmail.com', '*******')

# GET a profile
profile = api.get_profile('mohamad-arune-a26930176')

# GET a profiles contact info
contact_info = api.get_profile_contact_info('mohamad-arune-a26930176')

# GET all connected profiles (1st, 2nd and 3rd degree) of a given profile
connections = api.get_profile_connections('ACoAACnIxL4B6Ff_-AnBiMDQaXXn2jAvma9NkXI')

print(profile)
print(contact_info)
print(connections)

我得到这个结果:

{'lastName':'arune','locationName':'Evansville,Indiana Area','student':False,'elt':False,'firstName':'mohamad','entityUrn':'urn: li:fs_profile:ACoAACnIxL4B6Ff_-AnBiMDQaXXn2jAvma9NkXI','location':{'basicLocation':{'countryCode':'us','postalCode':'47521'},'preferredGeoPlace':'urn:li:fs_region:(us, 244)'},'headline':'azazazaz的学生','profile_id':'ACoAACnIxL4B6Ff_-AnBiMDQaXXn2jAvma9NkXI',“体验”:[],“技能”:[],“教育”:[{'entityUrn”:“ urn:li:fs_education:(ACoAACnIxL4B6Ff_-AnBiMDQaXXn2jAvma9NkXI,568801875)','timePeriod':{'endDate':{'year':2009},'startDate':{'year':2002}},'degreeName':' azazazaz”,“ schoolName”:“ azazzaz”,“ fieldOfStudy”:“ azazzaz”}]}

{'email_address':'linkedintestapi2@gmail.com','websites':[],'phone_numbers':[]}

[]

0 个答案:

没有答案