Python 显示LinkedIn用户作业
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用户作业的更多相关文章
- Python 摘录LinkedIn用户联系人
CODE: #!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 2014-8-18 @author: guaguastd @name: l ...
- Python 显示调用栈
Python调试不如强类型的语言方便,显示调用栈有时非常必要,inspect模块很好用 import inspect inspect.stack() inspect.stack()返回的是一个函数栈帧 ...
- Python 规范化LinkedIn用户联系人的职位名
CODE: #!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 2014-8-19 @author: guaguastd @name: j ...
- 使用python显示当前系统中的所有进程并关闭某一进程
环境: Windows 10操作系统 python idle 原理: 调用windows系统自带的命令task,该命令使用方式: 第一步.调用cmd命令行,显示当前系统中所有进程: Win+R-> ...
- Python显示函数调用堆栈
网上找到如下几个思路: 1.用inspect模块 2.用sys._getframe模块 3.用sys.exc_traceback,先抛一个异常,然后抓出traceback #!/usr/bin/env ...
- python显示当前时间
import time time.strftime("%Y%m%d %X", time.localtime()) #当前时区 time.strftime("%Y%m%d ...
- python显示进度条
当一个python任务是需要逐个处理相同的事物时(里面有循环操作,例如对一系列的文件进行处理),这时可以将处理的进度条加进来,下面是一个例子: import time import sys def v ...
- Python显示百分比
print(format(a/b,'.2%')) 显示两位小数的百分比显示
- python显示灰度图
import matplotlib import matplotlib.pyplot as plt %matplotlib inline im=plt.imread('../lena.jpg', py ...
随机推荐
- 零基Android手机嵌入式开发培训课程
亲爱的朋友,我这里有一组当然想和大家分享,假设有兴趣在这个过程中,可以加我QQ2059055336和我联系. 课程章节分布: 第一部分 嵌入式C与数据结构篇 (20讲) 第二部分ARM裸机开发篇 (4 ...
- exit()和_exit()和return
exit()和return的差别: 依照ANSI C,在最初调用的main()中使用return和exit()的效果同样. 但要注意这里所说的是"最初调用".假设main()在一个 ...
- 关于静态与动态编译arm平台程序的比較
因为近期弄个console程序,调用了readline,ncurses库,这两个动态库加起来有四百多k.而程序事实上非常小,其它地方也没使用到这两个库 所以想静态编译看看console程序有多大. # ...
- Java8高中并发
Java8中学并发 本文翻译自:http://jaxenter.com/lean-concurrency-in-java-8-49924.html 转载请注明出处:http://blog.csdn.n ...
- 用css3实现各种图标效果
原文:用css3实现各种图标效果 公共样式 应该说现在绝大多数公司的项目前端都是一团乱,不仅仅是js写的没有任何框架而言,css同样也是如此,导致项目如果要升级或者说有新的变更维护起来就特别困难. 最 ...
- LeetCode——Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). ...
- 对consistencygroup的一些研究和实践
声明: 本博客欢迎转载,但请保留原作者信息! 作者:李人可 团队:华为杭州OpenStack团队 consistency group,直译是一致性组,是Juno版本号cinder新引进的一个概念.顾名 ...
- 八月份 CUGBACM_Summer_Tranning 题解
CUGBACM_Summer_Tranning4 比赛链接:http://vjudge.net/contest/view.action?cid=52230#overview 题解链接: F . HDU ...
- (九)通过几段代码,理清angularJS中的$injector、$rootScope和$scope的概念和关联关系
$injector.$rootScope和$scope是angularJS框架中比較重要的东西,理清它们之间的关系,对我们兴许学习和理解angularJS框架都很实用. 1.$injector事实上是 ...
- Android点滴---ViewHolder通用,优雅写法
近期在做项目时,又要写 ViewHolder. 突然想到网上看看有没什么好的写法! 不知道你是不是也烦透了写那些没有技术含量的ViewHolder 看看这些.也许会有收获! 然后就找到了以下两篇文章( ...