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. Everything You Wanted to Know About Machine Learning

    Everything You Wanted to Know About Machine Learning 翻译了理解机器学习的10个重要的观点,增加了自己的理解.这些原则在大部分情况下或许是这样,可是 ...

  2. sql server数据库保存图片或者其他小文件

    原文:sql server数据库保存图片或者其他小文件 测试用sql server数据库保存图片或者其他小文件. 文件流字段用varbinary类型. static void Main() { App ...

  3. httpd的简单配置(转)

    一般网站都采用httpd作web服务器提供web页面,本文主要介绍下几个httpd中常用的配置属性和配置方式,当然具体应用更具具体需求来定. 代理模块配置: 由于网页动态化,网页的生成基本代理到后端服 ...

  4. httpclient超时总结(转)

    Httpclient超时 背景: 网站这边多次因为httpclient调用超时时间没设置好导致关掉,影响非常不好,而且问题重复出现,查看网络,没有比较明确介绍httpclient所有超时相关的设置(大 ...

  5. hdu2102(bfs)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2102 分析:bfs求最短时间到达'P'点,不过本题有好几个trick,我都踩到了,自己还是太嫩了... ...

  6. 【译】ASP.NET MVC 5 教程 - 1:入门

    原文:[译]ASP.NET MVC 5 教程 - 1:入门 本教程将教你使用Visual Studio 2013 预览版构建 ASP.NET MVC 5 Web 应用程序 的基础知识.本主题还附带了一 ...

  7. Jquery利用ajax调用asp.net webservice的各种数据类型(总结篇)

    原文:Jquery利用ajax调用asp.net webservice的各种数据类型(总结篇) 老话说的好:好记心不如烂笔头! 本着这原则,我把最近工作中遇到的jquery利用ajax调用web服务的 ...

  8. 怎样在屏幕上显示多个alv

    本文解说怎样在屏幕上显示多个alv. 实现这种需求关键是下面几点(举例:在屏幕上显示4个alv): 1.须要定义4个alv control 2.由于有4个alv control,于是就须要定义4个容器 ...

  9. eclipse加入辅助线,配合代码格式化使用

  10. Reset and clock control (RCC) STM32L

    Reset: 1.系统复位:A system reset sets all registers to their reset values except for the RTC, RTC backup ...