linkedin-scraper 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 936a8b7cfcee1f3c8493913588b5439b158cf23a
4
- data.tar.gz: cdd22bac59aa06beb4e7437b12fd296e6562a81c
3
+ metadata.gz: d0c5315f0800df733d0bce6293f437638502f93f
4
+ data.tar.gz: c6d2113b612934bb4fbc80410c3950e642539835
5
5
  SHA512:
6
- metadata.gz: 3ed7b6778698326f3e3a368da994a5929190b44acea39dd193d01c745232580dc0199604977f3a1d23463b45a1da71856073ca6c1e97cc8de516ef59d1ff2d25
7
- data.tar.gz: 84969f0dc805c7230f63e6bf31aaa825522647c955bb915065d3c749ef4e18a98cdce84fba8f5b52adbf022939bc2e842d48ef7b27bd4fe338d1eef1c87d39cf
6
+ metadata.gz: 430a33723d9c4a3ec9895524bcf175ce43de2a3e9c8e5b87ad416d6fd991a349ad26c9f75c223df83caa58e8373f0e59cad13f40f721304c103dfb6310bcfac3
7
+ data.tar.gz: b688c43884433decf12ab7c1353a4f466b4b03672c241e728ae62208c947176466382e72a28fc7d09ece7b8714238e2b0824b012f926df678381b6a3e71be861
data/README.md CHANGED
@@ -27,7 +27,7 @@ Initialize a scraper instance
27
27
 
28
28
  With a http web-proxy:
29
29
 
30
- profile = Linkedin::Profile.get_profile("http://www.linkedin.com/in/jeffweiner08", {:proxy_ip=>'127.0.0.1',:proxy_port=>'3128'})
30
+ profile = Linkedin::Profile.get_profile("http://www.linkedin.com/in/jeffweiner08", {:proxy_ip=>'127.0.0.1',:proxy_port=>'3128', :username=>"user", :password=>'pass'})
31
31
 
32
32
 
33
33
  The returning object responds to the following methods
@@ -264,7 +264,7 @@ For current and past companies it also provides the details of the companies lik
264
264
  The gem also comes with a binary and can be used from the command line to get a json response of the scraped data.
265
265
  It takes the url as the first argument.
266
266
 
267
- linkedin-scraper http://www.linkedin.com/in/jeffweiner08
267
+ linkedin-scraper http://www.linkedin.com/in/jeffweiner08 127.0.0.1 3128 username password
268
268
 
269
269
  ## Contributing
270
270
 
data/bin/linkedin-scraper CHANGED
@@ -1,5 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require_relative '../lib/linkedin_scraper'
4
- profile = Linkedin::Profile.new(ARGV[0])
4
+ options = {}
5
+ options[:proxy_ip] = ARGV[1]
6
+ options[:proxy_port] = ARGV[2]
7
+ options[:username] = ARGV[3]
8
+ options[:password] = ARGV[4]
9
+ profile = Linkedin::Profile.new(ARGV[0], options)
5
10
  puts JSON.pretty_generate JSON.parse(profile.to_json)
@@ -2,7 +2,7 @@
2
2
  module Linkedin
3
3
  class Profile
4
4
 
5
- USER_AGENTS = ["Windows IE 6", "Windows IE 7", "Windows Mozilla", "Mac Safari", "Mac FireFox", "Mac Mozilla", "Linux Mozilla", "Linux Firefox", "Linux Konqueror"]
5
+ USER_AGENTS = ["Windows IE 6", "Windows IE 7", "Windows Mozilla", "Mac Safari", "Mac Firefox", "Mac Mozilla", "Linux Mozilla", "Linux Firefox", "Linux Konqueror"]
6
6
  ATTRIBUTES = %w(
7
7
  name
8
8
  first_name
@@ -243,7 +243,7 @@ module Linkedin
243
243
  Mechanize.new do |agent|
244
244
  agent.user_agent_alias = USER_AGENTS.sample
245
245
  unless @options.empty?
246
- agent.set_proxy(@options[:proxy_ip], @options[:proxy_port])
246
+ agent.set_proxy(@options[:proxy_ip], @options[:proxy_port], @options[:username], @options[:password])
247
247
  end
248
248
  agent.max_history = 0
249
249
  end
@@ -1,5 +1,5 @@
1
1
  module Linkedin
2
2
  module Scraper
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin-scraper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yatish Mehta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-01 00:00:00.000000000 Z
11
+ date: 2016-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize