yatish27 / linkedin-scraper

Scrapes the public profile of the linkedin page
MIT License
555 stars 220 forks source link

return json with linkedin-scraper command #101

Closed iliasnaamane closed 7 years ago

iliasnaamane commented 7 years ago

I get an error when running ' linkedin-scraper http://www.linkedin.com/in/jeffweiner output.json '

/home/youpi/.rvm/gems/ruby-2.2.0/gems/linkedin-scraper-2.1.1/bin/linkedin-scraper:12:in<top (required)>': uninitialized constant JSON (NameError) from /home/youpi/.rvm/gems/ruby-2.2.0/bin/linkedin-scraper:23:in load' from /home/youpi/.rvm/gems/ruby-2.2.0/bin/linkedin-scraper:23:in

' from /home/youpi/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in eval' from /home/youpi/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in
' `

But it works well when working with code. Please kindly help me

ajrasch commented 7 years ago

@iliasnaamane Did you ever get this working from terminal? I'm having the same problem....

iliasnaamane commented 7 years ago

I have created a ruby file & run "ruby filename.rb linkedinUrl " then you will get linkedin profile in Json format. ` require 'linkedin-scraper'

profile = Linkedin::Profile.new("#{ARGV.first}") puts profile.to_json`