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 ...
随机推荐
- 实现ListView A~Z快速索引
ListView A~Z快速索引这种效果在通信录和城市列表中经常看到,方便用户查找,是一种增加用户体验的好方法. 实现步骤: 1.自定义一个名叫SlideBar 的View. 2.在布局文件中加入这个 ...
- 【Gapps】安装GooglePlay引发一系列问题
再次感谢小海的支持,感谢大家的支持! 从安装CM至如今GooglePlay,小海为我提供了非常多方案,能够说是全面支持.仅仅是出于隐私不便公开他的个人信息,仅提供一个他的博客地址http://luha ...
- Hdu 3410 【单调队列】.cpp
题意: 给出一个数组,问你对于第i个数,从最后一个比它大的数到它之间比它小的数中最大的那个数的下标,以及它右边到第一个比它大的数中比它小的数中最大的那一个数的下标<下标从1开始>. eg: ...
- 遇过的坑(2)—MyISAM表类型不支持事务操作
最近需要通过JDBC对数据库做事务型操作,实践时发现,并没有达到想要的效果,表现在:1.每次执行executeUpdate()后,数据就马上能在DB中查到.但按理来说,我还没执行commit(),DB ...
- Java EE (12) -- 系统质量的分类
明显的 性能(Performance): 对响应用户的应答时间的度量.可靠性(Reliability): 对包括后台存储和给用户的表示结果在内的数据正确的可能性的度量.可用性(Availability ...
- Xamarin 安装步骤
原文:Xamarin 安装步骤 1.下载并解压吾乐吧软件站提供的“Mono for Android 离线包” 安装:jdk-6u45-windows-i586.exe (就算你是64位系统,也要安装i ...
- Windows Phone开发(37):动画之ColorAnimation
原文:Windows Phone开发(37):动画之ColorAnimation 上一节中我们讨论了用double值进行动画处理,我们知道动画是有很多种的,今天,我向大家继续介绍一个动画类--Colo ...
- NET MVC运行机制
[图解ASP.NET MVC运行机制理解-简易版] 很多盆友咨询ASP.NET MVC的机制.网上也有好多.但是都是相当深奥.看的云里雾里的.我今天抽空,整理个简易版本.把处理流程走一遍. 当然, ...
- C# 32位程序访问64位系统注册表
原文:C# 32位程序访问64位系统注册表 我的上一篇文章已经阐述了“32位程序和64位程序在64位平台上读\写注册表的区别”,那么接下来将要回答上篇所留下来的一个问题:32位程序如何访问64位系统注 ...
- Sybase Unwired Platform(SUP) 经常使用资源整理(不断更新中)
提示:建议刚開始学习的人看三个东西,详见以下的详细内容.然后再去看论坛,官方技术支持站点等资源. SUP移动开发平台 中文视频讲座 SUP入门讲座(Wang Jun) SUP系列学习笔记 SUP实验 ...