Commit 135b4c82 by Mai Hoang Thai Ha

add logger to empty job title

parent c0f80e93
...@@ -27,7 +27,10 @@ namespace :crawler do ...@@ -27,7 +27,10 @@ namespace :crawler do
job_page = Nokogiri::HTML(HTTParty.get(url).body) job_page = Nokogiri::HTML(HTTParty.get(url).body)
# Job # Job
job_title = job_page.css('div.job-desc h1.title').text job_title = job_page.css('div.job-desc h1.title').text
next if job_title.nil? if job_title.blank?
logger.info 'Remove this job because title is empty'
next
end
# update_at, job_industries, job_type, salary, experience, level, expiration_date # update_at, job_industries, job_type, salary, experience, level, expiration_date
detail_box_items = job_page.css('.job-detail-content .detail-box ul li') detail_box_items = job_page.css('.job-detail-content .detail-box ul li')
# init # init
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment