linkedindata 0.0.20 → 0.0.21
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.
- checksums.yaml +4 -4
- data/lib/linkedin.rb +5 -4
- data/lib/linkedindata.rb +6 -3
- 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: 2ff082196f99b4e8ad4415d3859bb1083d167aee
|
4
|
+
data.tar.gz: 71fe3d75d04a8216fe08f56a4869a24f92140b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6023a233428aa06d15cd2ce154de40e7948e8870229cc7ea5b94d3e4aad4a2c7dc557b8b24ca230f5e0ae895f1224a5f6b604798e4bfe0d6b6bd0ac6fe94eb9a
|
7
|
+
data.tar.gz: 91f1e1f011d3774e32b863a905ba446891f7d8b7ae906cf1f14010b35017cf4d945cf8539b9dd2e9f192d17bf3b816fdb4cc3153b913204b0fce7a7e259fd0e3
|
data/lib/linkedin.rb
CHANGED
@@ -6,7 +6,7 @@ module Linkedin
|
|
6
6
|
include ProxyManager
|
7
7
|
include GetRelated
|
8
8
|
|
9
|
-
def initialize(url, curhops, proxylist, usedproxies)
|
9
|
+
def initialize(url, curhops, proxylist, usedproxies, use_proxies_li)
|
10
10
|
@linkedin_url = url
|
11
11
|
@curhops = curhops
|
12
12
|
@proxylist = proxylist
|
@@ -19,12 +19,13 @@ module Linkedin
|
|
19
19
|
"timestamp",
|
20
20
|
"degree",
|
21
21
|
"pic_path")
|
22
|
-
|
22
|
+
|
23
|
+
@page = getPage(url, use_proxies_li) # Get pages with proxies
|
23
24
|
end
|
24
25
|
|
25
26
|
|
26
|
-
def self.get_profile(url, curhops, proxylist, usedproxies)
|
27
|
-
Linkedin::Profile.new(url, curhops, proxylist, usedproxies)
|
27
|
+
def self.get_profile(url, curhops, proxylist, usedproxies, use_proxies_li)
|
28
|
+
Linkedin::Profile.new(url, curhops, proxylist, usedproxies, use_proxies_li)
|
28
29
|
rescue => e
|
29
30
|
puts e
|
30
31
|
end
|
data/lib/linkedindata.rb
CHANGED
@@ -3,6 +3,7 @@ require 'generalscraper'
|
|
3
3
|
require 'json'
|
4
4
|
require 'nokogiri'
|
5
5
|
require 'set'
|
6
|
+
require 'pry'
|
6
7
|
|
7
8
|
load 'parse_profile.rb'
|
8
9
|
load 'get_related.rb'
|
@@ -13,18 +14,20 @@ class LinkedinData
|
|
13
14
|
include ParseProfile
|
14
15
|
include Linkedin
|
15
16
|
|
16
|
-
def initialize(todegree, proxylist)
|
17
|
+
def initialize(todegree, proxylist, use_proxy, use_proxy_li)
|
17
18
|
@proxylist = IO.readlines(proxylist)
|
18
19
|
@proxy_list_path = proxylist
|
19
20
|
@usedproxies = Hash.new
|
20
21
|
@output = Array.new
|
21
22
|
@startindex = 10
|
22
23
|
@numhops = todegree
|
24
|
+
@use_proxy = use_proxy
|
25
|
+
@use_proxy_li = use_proxy_li
|
23
26
|
end
|
24
27
|
|
25
28
|
# Searches for profiles on Google
|
26
29
|
def search(search_terms)
|
27
|
-
g = GeneralScraper.new("site:linkedin.com/pub", search_terms, @proxy_list_path)
|
30
|
+
g = GeneralScraper.new("site:linkedin.com/pub", search_terms, @proxy_list_path, @use_proxy)
|
28
31
|
JSON.parse(g.getURLs).each do |profile|
|
29
32
|
scrape(profile, 0)
|
30
33
|
end
|
@@ -35,7 +38,7 @@ class LinkedinData
|
|
35
38
|
# Download profile and rescue on error
|
36
39
|
begin
|
37
40
|
url.gsub!("https", "http")
|
38
|
-
profile = Linkedin::Profile.get_profile(url, curhops, @proxylist, @usedproxies)
|
41
|
+
profile = Linkedin::Profile.get_profile(url, curhops, @proxylist, @usedproxies, @use_proxy_li)
|
39
42
|
|
40
43
|
# Parse profile if returned and add to output
|
41
44
|
@output.concat(parseResume(profile)) if profile
|
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.21
|
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: 2015-
|
11
|
+
date: 2015-08-22 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
|