CODE:

#!/usr/bin/python
# -*- coding: utf-8 -*- '''
Created on 2014-8-18
@author: guaguastd
@name: job_position_display.py
''' # import login
from login import linkedin_login # import json
import json # access to linkedin api
linkedin_api = linkedin_login() # Load connections data from disk file
connections_data = r'E:\eclipse\LinkedIn\dfile\linkedin_connections.json'
connections = json.loads(open(connections_data).read()) # Display your own positions...
print '\rMy positions with all information:\r'
my_positions = linkedin_api.get_profile(selectors=['positions'])
print json.dumps(my_positions, indent=1) # Display your own positions...
print '\rMy positions with only company information:\r'
my_positions = linkedin_api.get_profile(selectors=['positions:(company:(name,industry,id))'])
print json.dumps(my_positions, indent=1) # Display positions for someone in your network...
connection_ids = [c['id']
for c in connections['values']
if c.has_key('location')] for connection_id in connection_ids:
print '\rPositions whose id is %s:\r' % connection_id
connection_positions = linkedin_api.get_profile(member_id=connection_id, selectors=['positions'])
print json.dumps(connection_positions, indent=1)

RESULT:

My positions with all information:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2009,
"month": 12
},
"company": {
"id": 1448618,
"name": "Pica8 Inc."
},
"id": 509989134,
"isCurrent": true,
"title": "Data Mining, Analysis, Automation"
}
]
}
} My positions with only company information:
{
"positions": {
"_total": 1,
"values": [
{
"company": {
"id": 1448618,
"name": "Pica8 Inc."
}
}
]
}
} Positions whose id is pI4CXEK7gH:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2012,
"month": 7
},
"title": "Senior Consultant",
"company": {
"id": 2868072,
"name": "SoftTalent Consulting \u4e92\u8054\u7f51\u7cbe\u82f1\u8f6f\u4ef6\u5f00\u53d1\u4eba\u624d\u62db\u8058\u4e13\u5bb6"
},
"summary": "SoftTalent Consulting\u4e13\u6ce8\u5728\u8f6f\u4ef6\u4eba\u624d\u7684\u641c\u5bfb\u3002",
"isCurrent": true,
"id": 332578726
}
]
}
} Positions whose id is Xd-Bk8g6tv:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2009,
"month": 9
},
"title": "CEO & Founder",
"company": {
"id": 1448618,
"name": "Pica8 Inc."
},
"summary": "Execution. Create an open network solution. Enable innovation in the datacenter network.",
"isCurrent": true,
"id": 262359413
}
]
}
} Positions whose id is Iav6QYRTLk:
{
"positions": {
"_total": 0
}
} Positions whose id is VYzO1WXGPh:
{
"positions": {
"_total": 2,
"values": [
{
"startDate": {
"year": 2013,
"month": 10
},
"title": "Senior Software Developer",
"company": {
"id": 2494,
"name": "Bloomberg LP"
},
"summary": "Developing C++ high availability Bloomberg Terminal services responsible for delivering millions of real time financial data alerts per day.",
"isCurrent": true,
"id": 475536757
},
{
"startDate": {
"year": 2009,
"month": 10
},
"title": "Sole Trader",
"company": {
"name": "Dimitrios Kouzis-Loukas"
},
"summary": "Developed software solutions in C/C++ and Java for market leading businesses in the fields of finance, hardware design, particle physics and GIS.",
"isCurrent": true,
"id": 122386746
}
]
}
} Positions whose id is N_jQbpGMml:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2013,
"month": 2
},
"title": "Software Manager",
"company": {
"id": 166878,
"name": "WatchGuard Technologies"
},
"summary": "Networking development for XTM",
"isCurrent": true,
"id": 377469950
}
]
}
} Positions whose id is wTro4h6_CK:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2014,
"month": 4
},
"title": "Senior Software Engineer",
"company": {
"id": 1035,
"name": "Microsoft"
},
"summary": "Recommender System development.",
"isCurrent": true,
"id": 536101418
}
]
}
} Positions whose id is 5lVrRMvUEl:
{
"positions": {
"_total": 1,
"values": [
{
"company": {
"name": "\u6210\u90fd\u540e\u9662\u79d1\u6280\u6709\u9650\u516c\u53f8"
},
"id": 529513768,
"isCurrent": true,
"title": "\u521b\u529e\u4eba"
}
]
}
} Positions whose id is llopT6R_sI:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2011
},
"title": "Online Marketing Manager",
"company": {
"name": "Hebei Meishen Chemical Group CO.,Ltd"
},
"summary": "Mainly focus on magnesium oxide market at home and abroad , as a network marketing manager, using professional SEO, bidding extension services, help the company achieved good sales performance.",
"isCurrent": true,
"id": 533005372
}
]
}
} Positions whose id is PPzgxCdZFH:
{
"positions": {
"_total": 0
}
} Positions whose id is uFsj9caqQ_:
{
"positions": {
"_total": 1,
"values": [
{
"startDate": {
"year": 2007,
"month": 10
},
"title": "Director",
"company": {
"name": "CET"
},
"summary": "DMS\u3001AMI\u3001HAN\u3001CIS\u3001IEC-61968/61970",
"isCurrent": true,
"id": 166639434
}
]
}
} Positions whose id is 3mGHBgssI_:
{
"positions": {
"_total": 0
}
} Positions whose id is cQZpI8aFDI:
{
"positions": {
"_total": 1,
"values": [
{
"company": {
"id": 3612573,
"name": "\uff01\uff01"
},
"id": 513645688,
"isCurrent": true,
"title": "S"
}
]
}
} Positions whose id is TmfAl8Gr6E:
{
"positions": {
"_total": 0
}
}

Python 显示LinkedIn用户作业的更多相关文章

  1. Python 摘录LinkedIn用户联系人

    CODE: #!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 2014-8-18 @author: guaguastd @name: l ...

  2. Python 显示调用栈

    Python调试不如强类型的语言方便,显示调用栈有时非常必要,inspect模块很好用 import inspect inspect.stack() inspect.stack()返回的是一个函数栈帧 ...

  3. Python 规范化LinkedIn用户联系人的职位名

    CODE: #!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 2014-8-19 @author: guaguastd @name: j ...

  4. 使用python显示当前系统中的所有进程并关闭某一进程

    环境: Windows 10操作系统 python idle 原理: 调用windows系统自带的命令task,该命令使用方式: 第一步.调用cmd命令行,显示当前系统中所有进程: Win+R-> ...

  5. Python显示函数调用堆栈

    网上找到如下几个思路: 1.用inspect模块 2.用sys._getframe模块 3.用sys.exc_traceback,先抛一个异常,然后抓出traceback #!/usr/bin/env ...

  6. python显示当前时间

    import time time.strftime("%Y%m%d %X", time.localtime()) #当前时区 time.strftime("%Y%m%d ...

  7. python显示进度条

    当一个python任务是需要逐个处理相同的事物时(里面有循环操作,例如对一系列的文件进行处理),这时可以将处理的进度条加进来,下面是一个例子: import time import sys def v ...

  8. Python显示百分比

    print(format(a/b,'.2%')) 显示两位小数的百分比显示

  9. python显示灰度图

    import matplotlib import matplotlib.pyplot as plt %matplotlib inline im=plt.imread('../lena.jpg', py ...

随机推荐

  1. 解决NGINX的WORDPRESS伪静态规则失效的问题

    解决NGINX的WORDPRESS伪静态规则失效的问题 前两天搬到了EMSVPS的PR线路上,用上了最新的WDCP2.0管理面板,支持多用户管理(我们几个合租的VPS,最需要这个功能了),感觉很不错, ...

  2. CF 518D(概率dp)

    传送门:Ilya and Escalator 题意:有n个人排队进车厢,每秒只能进一个人,而且第1个人进了后面的人才能进,第一个人每秒进入车厢的概率为p,不进的概率为1-p,求t秒后进入车厢总人数的数 ...

  3. 蜗牛—JSONJ学习ava转变

    最近,写网站管理员,使用异步通信技术,所使用的方法是JSON数据传输模式 需要以下jar文件 然后,自己写了一点点经常使用代码 Java的List和数组要用JSONArray对象 Map和实体用JSO ...

  4. 一张图总结Google C++编程规范(Google C++ Style Guide)

    Google C++ Style Guide是一份不错的C++编码指南,我制作了一张比較全面的说明图,能够在短时间内高速掌握规范的重点内容.只是规范毕竟是人定的,记得活学活用.看图前别忘了阅读以下三条 ...

  5. hdu2955(变形01背包)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2955 分析:被抓概率可以转换成安全概率,Roy的安全概率大于1-P时都是安全的. 抢劫的金额为0时,肯 ...

  6. birdnest是什么意思_birdnest在线翻译_英语_读音_用法_例句_海词词典

    birdnest是什么意思_birdnest在线翻译_英语_读音_用法_例句_海词词典 birdnest

  7. C#之网络

    首先很不好意思,前段时间把评论的功能给关掉啦,BUT NOW 此功能以开放,欢迎小伙伴们拍砖. 1网络 在网络环境下,我们最感兴趣的两个名称空间是System.Net和System.Net.Socke ...

  8. Jndi使用好处,与简单实例【JBOSS】

    JNDI是 Java 命名与目录接口(Java Naming and Directory Interface),在J2EE规范中是重要的规范之一,不少专家认为,没有透彻理解JNDI的意义和作用,就没有 ...

  9. win7系统u盘安装过程

    1.准备好带有启动项的U盘,并把镜像解压到里面去 2.插上u盘,开机长按del键进入bois设置界面 在boot页面 1.boot device priority->1st boot devic ...

  10. 李林APUE之进程的封装

    1.子进程是父进程的副本,获得父进程的数据空间/堆/栈,父子进程共享代码段.子进程从fork后開始运行.返回值=0表示子进程,由于子进程能够通过函数来获取父进程的ID,可是父进程无法知道子进程的ID. ...