linkedindata 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/linkedindata.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7090425189f63004f4fceee1cd0c004f689428a9
|
4
|
+
data.tar.gz: 76b0ab55e5541f61fdabda928b80e653a80b8824
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2deb49e6624cb1a7c9792a1c3f5a581f3b78ea37dedb6252598179e4ad0d553b96fefa9a63d7733a9c91d7bdae3071edf90919d770e31f3686f305eb5850c9c0
|
7
|
+
data.tar.gz: 7173d1905beacb050c0a2cc5da69038394144dfeb34f4a463ee3204830bafe794d91ba8b613f2164f63453a9158fe31444b2bb84b681138091dfd06ec1ce0352
|
data/lib/linkedindata.rb
CHANGED
@@ -64,8 +64,11 @@ class LinkedinData
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
67
|
+
begin
|
67
68
|
url.gsub!("https", "http")
|
68
69
|
profile = Linkedin::Profile.get_profile(url)
|
70
|
+
rescue
|
71
|
+
end
|
69
72
|
|
70
73
|
if profile
|
71
74
|
profile.current_companies.each do |c|
|
@@ -74,7 +77,10 @@ class LinkedinData
|
|
74
77
|
if profile.picture
|
75
78
|
path = profile.picture.split("/")
|
76
79
|
if !File.file?("public/uploads/pictures/" + path[path.length-1].chomp.strip)
|
80
|
+
begin
|
77
81
|
`wget -P public/uploads/pictures #{profile.picture}`
|
82
|
+
rescue
|
83
|
+
end
|
78
84
|
end
|
79
85
|
c.merge!(:pic_path => "public/uploads/pictures/" + path[path.length-1].chomp.strip)
|
80
86
|
end
|
@@ -89,7 +95,10 @@ class LinkedinData
|
|
89
95
|
if profile.picture
|
90
96
|
path = profile.picture.split("/")
|
91
97
|
if !File.file?("public/uploads/pictures/" + path[path.length-1].chomp.strip)
|
98
|
+
begin
|
92
99
|
`wget -P public/uploads/pictures #{profile.picture}`
|
100
|
+
rescue
|
101
|
+
end
|
93
102
|
end
|
94
103
|
c.merge!(:pic_path => "public/uploads/pictures/" + path[path.length-1].chomp.strip)
|
95
104
|
end
|
@@ -107,7 +116,12 @@ class LinkedinData
|
|
107
116
|
# Gets related profiles listed on side of the page
|
108
117
|
def getRelated(url)
|
109
118
|
if @degree < @to_degree
|
119
|
+
begin
|
110
120
|
html = Nokogiri::HTML(open(url))
|
121
|
+
rescue
|
122
|
+
end
|
123
|
+
|
124
|
+
if html
|
111
125
|
html.css("li.with-photo").each do |l|
|
112
126
|
plink = l.css("a")[0]['href'].split("?")
|
113
127
|
|
@@ -121,10 +135,14 @@ class LinkedinData
|
|
121
135
|
|
122
136
|
if flag == 0
|
123
137
|
@degree += 1
|
138
|
+
begin
|
124
139
|
scrape(plink[0])
|
140
|
+
rescue
|
141
|
+
end
|
125
142
|
@degree -= 1
|
126
143
|
end
|
127
144
|
end
|
145
|
+
end
|
128
146
|
end
|
129
147
|
end
|
130
148
|
|
@@ -134,3 +152,4 @@ class LinkedinData
|
|
134
152
|
return JSON.pretty_generate(@output)
|
135
153
|
end
|
136
154
|
end
|
155
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linkedindata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. C. McGrath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Scrapes all LinkedIn profiles including terms you specify.
|
14
14
|
email: shidash@shidash.com
|