Commit 5ca97b87 by Huỳnh Thiên Phước

Merge branch 'master' into 'industry_list'

# Conflicts:
#   app/controllers/cities_controller.rb
#   app/models/city.rb
#   lib/src/csv_importer.rb
parents a8e034a4 784ae619
Pipeline #848 failed with stages
in 0 seconds
...@@ -15,8 +15,9 @@ class JobParser ...@@ -15,8 +15,9 @@ class JobParser
links = info.css('div.caption a.company-name').map { |link| link['href'] } links = info.css('div.caption a.company-name').map { |link| link['href'] }
links.each do |link| links.each do |link|
next if link == 'javascript:void(0);' next if link == 'javascript:void(0);'
page = Nokogiri::HTML(URI.open(URI.escape(link)))
name = page.search('p.name')&.text page = Nokogiri::HTML(URI.open(URI.escape(link)))
name = page.search('p.name')&.text
next if name.blank? next if name.blank?
address = page.css('div.content p').children[1]&.text address = page.css('div.content p').children[1]&.text
......
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