linkedin-scraper 0.0.5 → 0.0.6
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/linkedin-scraper/profile.rb +3 -2
- data/lib/linkedin-scraper/version.rb +1 -1
- metadata +1 -1
|
@@ -48,6 +48,7 @@ module Linkedin
|
|
|
48
48
|
@past_companies=get_past_companies page
|
|
49
49
|
@recommended_visitors=get_recommended_visitors page
|
|
50
50
|
@linkedin_url=url
|
|
51
|
+
@page=page
|
|
51
52
|
end
|
|
52
53
|
#returns:nil if it gives a 404 request
|
|
53
54
|
def self.get_profile url
|
|
@@ -55,8 +56,8 @@ module Linkedin
|
|
|
55
56
|
@agent=Mechanize.new
|
|
56
57
|
@agent.user_agent_alias = USER_AGENTS.sample
|
|
57
58
|
@agent.max_history = 0
|
|
58
|
-
|
|
59
|
-
return Linkedin::Profile.new(
|
|
59
|
+
page=@agent.get url
|
|
60
|
+
return Linkedin::Profile.new(page, url)
|
|
60
61
|
rescue=>e
|
|
61
62
|
puts e
|
|
62
63
|
end
|