linkedindata 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/linkedindata.rb +2 -2
- metadata +2 -2
data/lib/linkedindata.rb
CHANGED
|
@@ -12,6 +12,7 @@ class LinkedinData
|
|
|
12
12
|
# Searches for links on Google
|
|
13
13
|
def search
|
|
14
14
|
agent = Mechanize.new
|
|
15
|
+
agent.user_agent_alias = 'Linux Firefox'
|
|
15
16
|
gform = agent.get("http://google.com").form("f")
|
|
16
17
|
gform.q = "site:linkedin.com/pub " + @input
|
|
17
18
|
page = agent.submit(gform, gform.buttons.first)
|
|
@@ -35,7 +36,7 @@ class LinkedinData
|
|
|
35
36
|
url2 = url1[1].split("&sa=N")
|
|
36
37
|
|
|
37
38
|
if url2[0].to_i == @startindex
|
|
38
|
-
sleep(
|
|
39
|
+
sleep(rand(30..90))
|
|
39
40
|
@startindex += 10
|
|
40
41
|
agent = Mechanize.new
|
|
41
42
|
examine(agent.get("http://google.com" + link.href))
|
|
@@ -67,4 +68,3 @@ class LinkedinData
|
|
|
67
68
|
return JSON.pretty_generate(@output)
|
|
68
69
|
end
|
|
69
70
|
end
|
|
70
|
-
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.4
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-02-
|
|
12
|
+
date: 2014-02-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Scrapes all LinkedIn profiles including terms you specify.
|
|
15
15
|
email: shidash@shidash.com
|