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 ...
随机推荐
- Eclipse 每次打开workspace目录记录位置?
E:\eclipse_j2ee eclipse安装根目录 在这个文件下: E:\eclipse_j2ee\configuration\.settings\org.eclipse.ui.ide.pref ...
- windows 7多点触摸开发
win7 触摸屏系统应用广泛,软件操作方便,功能强大,现以被很多硬件厂商应用. 我曾用一台装有win7 的汉王平板电脑进行了多点触摸软件的开发. 开发环境及条件: 1. 平板电脑+ win7 ...
- Codeforces Round #272 (Div. 1)C(字符串DP)
C. Dreamoon and Strings time limit per test 1 second memory limit per test 256 megabytes input stand ...
- ActionBar本部分适用述评
http://note.youdao.com/share/?id=7f213cb64069bad221f4581507707294&type=note 因为把图片拿进来太麻烦,所以我给了一个直 ...
- 关于在ios7之后改变状态栏颜色
看到网上都说 在ios7之后要这样设置 首先,须要在Info.plist配置文件里,添加键:UIViewControllerBasedStatusBarAppearance,并设置为YES: 然后,在 ...
- Linux C 编程内存泄露检測工具(二):memwatch
Memwatch简单介绍 在三种检測工具其中,设置最简单的算是memwatch,和dmalloc一样,它能检測未释放的内存.同一段内存被释放多次.位址存取错误及不当使用未分配之内存区域.请往http: ...
- 13.怎样自学Struts2之Struts2本地化[视频]
13.怎样自学Struts2之Struts2本地化[视频] 之前写了一篇"打算做一个视频教程探讨怎样自学计算机相关的技术",优酷上传不了,仅仅好传到百度云上: http://pan ...
- PHPDocumentor代码注释规范说明
PHPDocumentor是一个的用PHP写的道具,对于有规则注释的php程序,它能够快速生成具有相互参照,索引等功能的API文档. 标记 用途 描述 @abstract 抽象类的变量和方法 ...
- SVN的命令解析(感觉不错就转了)
本文链接: http://www.php-oa.com/2008/03/12/svnminglingzailinuxxiadeshiyong.html .将文件checkout到本地目录 svn ch ...
- C++基础学习教程(八)
转载请注明出处:http://blog.csdn.net/suool/article/details/38300117 引入 在进行下一步的学习之前,我们须要厘清几个概念. RAII 首先介绍一个编程 ...