Created simple web scrapper for ruby jobs in Dublin via indeed.ie#64
Open
Visiona wants to merge 4 commits intovikingeducation:masterfrom
Open
Created simple web scrapper for ruby jobs in Dublin via indeed.ie#64Visiona wants to merge 4 commits intovikingeducation:masterfrom
Visiona wants to merge 4 commits intovikingeducation:masterfrom
Conversation
remis1889
reviewed
Apr 16, 2017
web_searcher.rb
Outdated
| @@ -0,0 +1,4 @@ | |||
|
|
|||
| class WebSearcher | |||
mechanized_agent.rb
Outdated
| require 'mechanize' | ||
|
|
||
|
|
||
| Agent = Mechanize.new { |agt| agt.user_agent_alias = 'Mac Firefox' } No newline at end of file |
There was a problem hiding this comment.
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 } |
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.