Skip to content

Created simple web scrapper for ruby jobs in Dublin via indeed.ie#64

Open
Visiona wants to merge 4 commits intovikingeducation:masterfrom
Visiona:master
Open

Created simple web scrapper for ruby jobs in Dublin via indeed.ie#64
Visiona wants to merge 4 commits intovikingeducation:masterfrom
Visiona:master

Conversation

@Visiona
Copy link

@Visiona Visiona commented Jan 21, 2017

No description provided.

Copy link

@remis1889 remis1889 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

web_searcher.rb Outdated
@@ -0,0 +1,4 @@

class WebSearcher

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused class.

require 'mechanize'


Agent = Mechanize.new { |agt| agt.user_agent_alias = 'Mac Firefox' } No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also be done in the initialize method of WebScrapper class

web_scrapper.rb Outdated

def page_with_search_results(city = "Dublin", role = "ruby", page_no = 1)
agent = Mechanize.new { |agt| agt.user_agent_alias = 'Mac Firefox' }
agent.history_added = Proc.new { sleep 0.5 }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 22-23 should ideally belong to the initialize method of the class.

web_scrapper.rb Outdated
# puts "DBG: advert = #{advert.inspect}"
array = scrapping_data_from(advert)
# puts "DBG: array = #{array.inspect}"
@job_posts << array

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 38 and 40 could be combined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants