Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VeNJob
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
1
Merge Requests
1
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
Tô Ngọc Ánh
VeNJob
Commits
102be3eb
Commit
102be3eb
authored
Jul 24, 2020
by
Tô Ngọc Ánh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug convert info detail job
parent
61ab1820
Pipeline
#697
canceled with stages
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
config/schedule.rb
+3
-2
lib/tasks/crawler.rake
+4
-4
No files found.
config/schedule.rb
View file @
102be3eb
...
@@ -19,6 +19,6 @@
...
@@ -19,6 +19,6 @@
# Learn more: http://github.com/javan/whenever
# Learn more: http://github.com/javan/whenever
env
:PATH
,
ENV
[
'PATH'
]
env
:PATH
,
ENV
[
'PATH'
]
every
5
.
minutes
do
every
:day
,
at:
'12:00 pm'
do
rake
'crawl:crawl_industries_locations_jobs[
1
]'
rake
'crawl:crawl_industries_locations_jobs[
4
]'
end
end
\ No newline at end of file
lib/tasks/crawler.rake
View file @
102be3eb
...
@@ -66,10 +66,10 @@ def crawl_job(job_link)
...
@@ -66,10 +66,10 @@ def crawl_job(job_link)
job_industry_names
=
document
.
at_xpath
(
'//li[./strong/em[contains(@class, "mdi mdi-briefcase")]]'
).
css
(
'p a'
).
map
{
|
val
|
val
.
text
.
strip
}
job_industry_names
=
document
.
at_xpath
(
'//li[./strong/em[contains(@class, "mdi mdi-briefcase")]]'
).
css
(
'p a'
).
map
{
|
val
|
val
.
text
.
strip
}
job_industries
=
Industry
.
where
(
name:
job_industry_names
)
job_industries
=
Industry
.
where
(
name:
job_industry_names
)
job_salary
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "fa fa-usd")]]
'
).
css
(
'p'
).
text
job_salary
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "fa fa-usd")]]
/p'
).
try
(
:text
).
try
(
:strip
)
job_level
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "mdi mdi-account")]]
'
).
css
(
'p'
).
text
job_level
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "mdi mdi-account")]]
/p'
).
try
(
:text
).
try
(
:strip
)
job_experience
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "fa fa-briefcase")]]
'
).
css
(
'p'
).
text
job_experience
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "fa fa-briefcase")]]
/p'
).
try
(
:text
).
try
(
:strip
)
job_expiration_date
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "mdi mdi-calendar-check")]]
'
).
css
(
'p'
).
text
job_expiration_date
=
document
.
at_xpath
(
'//li[./strong/i[contains(@class, "mdi mdi-calendar-check")]]
/p'
).
try
(
:text
).
try
(
:strip
)
job_description
=
document
.
css
(
'.job-detail-content .detail-row'
).
to_s
job_description
=
document
.
css
(
'.job-detail-content .detail-row'
).
to_s
...
...
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