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
d8e11b39
Commit
d8e11b39
authored
Feb 17, 2020
by
thanhnd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shorten CSS selector
parent
6f382fd2
Pipeline
#460
canceled with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lib/tasks/crawler.rake
+3
-2
No files found.
lib/tasks/crawler.rake
View file @
d8e11b39
...
...
@@ -16,11 +16,12 @@ namespace :crawler do
#get link for next page
np
=
Nokogiri
::
HTML
(
open
(
list_url
))
nextpage
=
np
.
css
(
'html body.jobseeker_site.A-Bootstrap div#uni_wrapper div#uni_container div.cb-container div.col-sm-12.col-md-9.col-ListJobCate div.paginationTwoStatus a.right'
)
#nextpage = np.css('html body.jobseeker_site.A-Bootstrap div#uni_wrapper div#uni_container div.cb-container div.col-sm-12.col-md-9.col-ListJobCate div.paginationTwoStatus a.right')
nextpage
=
np
.
css
(
'div.paginationTwoStatus a.right'
)
puts
nextpage
[
0
][
"href"
]
#get all links in one page
links
=
page
.
css
(
'
html body.jobseeker_site.A-Bootstrap div#uni_wrapper div#uni_container div.cb-container div.col-sm-12.col-md-9.col-ListJobCate div.gird_standard dl dd.brief
span.jobtitle h3.job a'
)
links
=
page
.
css
(
'span.jobtitle h3.job a'
)
area
=
Area
.
find
(
1
)
links
.
each
do
|
link
|
...
...
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