Commit 654d7a1c by nnnghia98

fix indent

parent e251e29f
...@@ -35,6 +35,7 @@ class CrawlData ...@@ -35,6 +35,7 @@ class CrawlData
detail = detail_job_new[detail_part].text detail = detail_job_new[detail_part].text
if detail.include?("Nơi làm việc") if detail.include?("Nơi làm việc")
job_workplace = detail.gsub("/[\r\n]+/", "").partition(":").last.split(",") job_workplace = detail.gsub("/[\r\n]+/", "").partition(":").last.split(",")
binding.pry
elsif detail.include?("Lương") elsif detail.include?("Lương")
job_salary = detail.gsub("/[\r\n]+/", "").partition(":").last.strip job_salary = detail.gsub("/[\r\n]+/", "").partition(":").last.strip
elsif detail.include?("Cấp bậc") elsif detail.include?("Cấp bậc")
...@@ -104,7 +105,7 @@ class CrawlData ...@@ -104,7 +105,7 @@ class CrawlData
def city_id(name) def city_id(name)
name = name.strip name = name.strip
City.find_or_create_by(name: city_name, region: "Việt Nam").id City.find_or_create_by(name: name, region: "Việt Nam").id
end end
def job_id(code = nil, title, salary, description, requirement, level, post_date, expiration_date, company_id) def job_id(code = nil, title, salary, description, requirement, level, post_date, expiration_date, company_id)
......
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