Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venjob_thanhnd
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
thanhnd
venjob_thanhnd
Commits
6d9625dc
Commit
6d9625dc
authored
Feb 18, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix review 20200218 2
parent
591cf6e6
Pipeline
#466
canceled with stages
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
lib/tasks/crawler.rake
+9
-8
No files found.
lib/tasks/crawler.rake
View file @
6d9625dc
...
@@ -29,19 +29,20 @@ namespace :crawler do
...
@@ -29,19 +29,20 @@ namespace :crawler do
uri
=
URI
::
encode
(
url
)
uri
=
URI
::
encode
(
url
)
job
=
Nokogiri
::
HTML
(
open
(
uri
))
job
=
Nokogiri
::
HTML
(
open
(
uri
))
detail_selector
=
'#showScroll .DetailJobNew'
job_detail
=
job
.
css
(
'#showScroll .DetailJobNew'
)
title
=
job
.
css
(
'.top-job-info h1'
)
title
=
job
.
css
(
'.top-job-info h1'
)
company_name
=
job
.
css
(
'.top-job-info .tit_company'
)
company_name
=
job
.
css
(
'.top-job-info .tit_company'
)
updated_date
=
job
.
css
(
'.datepost span'
)
updated_date
=
job
.
css
(
'.datepost span'
)
location
=
job
.
css
(
"
#{
detail_selector
}
li[1].bgLine1 p[1].fl_left b a[2]"
)
location
=
job
_detail
.
css
(
'li[1].bgLine1 p[1].fl_left b a[2]'
)
experience
=
job
.
css
(
"
#{
detail_selector
}
li[2].bgLine2 p[1].fl_left > text()"
)
experience
=
job
_detail
.
css
(
'li[2].bgLine2 p[1].fl_left > text()'
)
industry
=
job
.
css
(
"
#{
detail_selector
}
li[3].bgLine1 p[1].fl_left b"
)
industry
=
job
_detail
.
css
(
'li[3].bgLine1 p[1].fl_left b'
)
level
=
job
.
css
(
"
#{
detail_selector
}
.bgLine1 .fl_right label"
)
level
=
job
_detail
.
css
(
'.bgLine1 .fl_right label'
)
salary
=
job
.
css
(
"
#{
detail_selector
}
.bgLine2 .fl_right label"
)
salary
=
job
_detail
.
css
(
'.bgLine2 .fl_right label'
)
deadline
=
job
.
css
(
"
#{
detail_selector
}
li[3].bgLine1 p[2].fl_right > text()"
)
deadline
=
job
_detail
.
css
(
'li[3].bgLine1 p[2].fl_right > text()'
)
description
=
job
.
css
(
'.MarBot20'
)
description
=
job
.
css
(
'.MarBot20'
)
address
=
job
.
css
(
'.box1Detail .TitleDetailNew label label'
)
address
=
job
.
css
(
'.box1Detail .TitleDetailNew label label'
)
company_intro
=
job
.
css
(
'#emp_more'
)
company_intro
=
job
.
css
(
'
.desc_company.content_fck span
#emp_more'
)
#skip if field blank
#skip if field blank
next
if
industry
.
text
.
blank?
next
if
industry
.
text
.
blank?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment