LinkedInData
LinkedInData copied to clipboard
undefined method
Hi,
Great tool you are making, I tried using your gem and get the following error when requesting a single profile:
.rvm/gems/ruby-2.1.2/gems/linkedindata-0.0.19/lib/get_related.rb:22:in getRelatedProfiles': undefined method
times' for "100":String (NoMethodError)
from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/linkedindata-0.0.19/lib/linkedindata.rb:71:in prepareResults' from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/linkedindata-0.0.19/lib/linkedindata.rb:79:in
getSingleProfile'
from ./linkedInSearch:8:in `
When doing a search we get an error in the generalscraper
generalscraper-0.0.6/lib/generalscraper.rb:31:in categorizeLinks': undefined method
links' for nil:NilClass (NoMethodError)
from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:63:in nextSearchPage' from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:35:in
block in categorizeLinks'
from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:31:in each' from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:31:in
categorizeLinks'
from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:26:in `search'
A couple things that could be an issue-
- This version only works with a list of proxies to scrape from (which don't necessarily need to be remote). Are you calling it with this list? (Although this gem used to work without a proxy list and I can add this back this option if people are interested.)
- From "100":String (NoMethodError) it looks like the number of hops might be being passed as a string. This needs to be an integer.
- There could be some other small thing wrong with how it's being called (examples on how this should work are below)
Generally, this is what getting a single profile should look like if you has a proxylist at ~/proxylist and wanted to go out two hops- l = LinkedinData.new(2, "~/proxylist") l.getSingleProfile("http://linkedin.com/pub/userprofilelink")
And the same, but getting all profiles that mention "ruby"- l = LinkedinData.new(2, "~/proxylist") l.getByKeywords("ruby")
If this doesn't help, please let me know.
Hey Great to get this feedback from you.
I changed the list an i used a open proxy in my personal proxylist, if you have a larger list that would be great.
But now i get a different error:
/Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:31:in
categorizeLinks': undefined method
links' for nil:NilClass (NoMethodError)
from
/Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:26:in
search' from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/generalscraper-0.0.6/lib/generalscraper.rb:79:in
getURLs'
from
/Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/linkedindata-0.0.19/lib/linkedindata.rb:28:in
search' from /Users/jjanssen/.rvm/gems/ruby-2.1.2/gems/linkedindata-0.0.19/lib/linkedindata.rb:84:in
getByKeywords'
from ./linkedInSearch:9:in `
On Sat, Apr 18, 2015 at 7:57 PM, M. C. McGrath [email protected] wrote:
A couple things that could be an issue-
- This version only works with a list of proxies to scrape from (which don't necessarily need to be remote). Are you calling it with this list? (Although this gem used to work without a proxy list and I can add this back this option if people are interested.)
- From "100":String (NoMethodError) it looks like the number of hops might be being passed as a string. This needs to be an integer.
- There could be some other small thing wrong with how it's being called (examples on how this should work are below)
Generally, this is what getting a single profile should look like if you has a proxylist at ~/proxylist and wanted to go out two hops- l = LinkedinData.new(2, "~/proxylist") l.getSingleProfile("http://linkedin.com/pub/userprofilelink")
And the same, but getting all profiles that mention "ruby"- l = LinkedinData.new(2, "~/proxylist") l.getByKeywords("ruby")
If this doesn't help, please let me know.
— Reply to this email directly or view it on GitHub https://github.com/TransparencyToolkit/LinkedInData/issues/1#issuecomment-94187580 .