I just tested the library and is working great with a few minor glitches: json response returns empty values for languages and certifications (I tested on my account and i have both completed). In your code i saw this:
def languages
@languages ||= @page.search(".background-languages #languages ol li").map do |item|
language = item.at("h4").text rescue nil
proficiency = item.at("div.languages-proficiency").text.gsub(/\s+|\n/, " ").strip rescue nil
{ :language => language, :proficiency => proficiency }
end
end
On the public profile there are no .background-languages and background-certifications classes. I use the following code in php with simpledom library and is working:
Hi!
I just tested the library and is working great with a few minor glitches: json response returns empty values for languages and certifications (I tested on my account and i have both completed). In your code i saw this:
def languages @languages ||= @page.search(".background-languages #languages ol li").map do |item| language = item.at("h4").text rescue nil proficiency = item.at("div.languages-proficiency").text.gsub(/\s+|\n/, " ").strip rescue nil { :language => language, :proficiency => proficiency } end end
On the public profile there are no .background-languages and background-certifications classes. I use the following code in php with simpledom library and is working:
$education = $html->find('#education > li.school'); foreach ($education as $school) { $school_name = $school->find('.item-title', 0)->innertext; $title = $school->find('.item-subtitle', 0)->innertext; $start_date = !empty($school->find('.date-range > time', 0)) ? date('Y', strtotime($school->find('.date-range > time', 0)->innertext)) : ''; $end_date = !empty($school->find('.date-range > time', 1)) ? date('Y', strtotime($school->find('.date-range > time', 1)->innertext)) : '';
Maybe this helps you.