job-hunter | Job scraper and applier for indeed.com | Bot library
kandi X-RAY | job-hunter Summary
kandi X-RAY | job-hunter Summary
Job scraper and applier for indeed.com
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of job-hunter
job-hunter Key Features
job-hunter Examples and Code Snippets
Community Discussions
Trending Discussions on job-hunter
QUESTION
I've modified an out of date bot that applies to jobs on indeed.com, but they decided to renovate their site again so as you can imagine, things no longer work and the bot is once more out of date.
I'm wondering how it is possible to visit the US version of the site indeed.com. There used to be a link that said "for US, click here" but they removed it entirely. Now when running the bot, I get job postings exclusively in Canada.
HOWEVER, when I visit indeed.com from my browser as a Canadian resident, it takes me directly to the US site. Things just don't make sense. Is the bot downloading a different page? Is there a way to specify in the code that i seek the US site or that my browser hails from a US region/IP-address?
Thank you in advance.
Here is the original code: https://github.com/jmopr/job-hunter/blob/master/scraper.rb
One additional problem, since i don't use selenium and instead use the webkit. It seems that I am unable to use the command save_and_open_page. Is there an alternative for webkit? It would make me able to see the site that the bot is visiting and make debugging much easier.
...ANSWER
Answered 2018-Jul-20 at 23:28If I visit the Canadian site ca.indeed.com there is still a link at the bottom for US jobs, not sure whether that's there for you or not. save_and_open_page
and save_and_open_screenshot
should both work with the capybara-webkit
driver (which is what specifying :webkit is getting you) as long as you call them on page
, however why not just swap over to using Firefox or Chrome for this so you can see exactly whats happening.
Remove the Capybara::Webkit.configure, and require 'capybara-webkit'. Instead require selenium-webdriver
and set Capybara.default_driver (and Capybara.javascript_driver if you want although it's actually not doing anything in that code and could be removed) to :selenium for Firefox or :selenium_chrome for Chrome.
QUESTION
I'm trying to run a webscraper that scrapes indeed.com and applies for jobs. What really gets me is the inconsistent, yet random errors. I'm not a programmer, but as far as I understand, if 2+2=4, then it should always be 4.
Here is the script I'm trying to run: https://github.com/jmopr/job-hunter/blob/master/scraper.rb
Seems to only work with firefox v45.0.2 because of the geckodriver
My own fixes in scraper.rb if you wish to execute the script yourself:
...ANSWER
Answered 2018-Jan-25 at 01:262+2=4 under a given set of assumptions and conditions. Browsers and scrapers unfortunately aren't that predictable, with random delays, page throttling, changing pages, varying support levels for different technologies, etc.
In your current case the reason for the window_opened_by
error could have been not having Capybara.default_max_wait_time
set long enough (how long Capybara will wait for the window to open), however if you try the search manually you'll see that indeed
no longer opens the job description in a new window if the current window is wide enough to show it in a right panel. Basically the code you're trying to use is no longer fully compatible with indeed.com
due to changes in how indeed.com
works. You could fix this by setting the drivers window size to a size where indeed.com will always open a new window, or by setting the window size big enough job descriptions open on the same page and rewriting the code to not look for a new window.
As for the no '#fj' issue, the easiest way to debug that is to put
QUESTION
Code: https://github.com/jmopr/job-hunter/blob/master/scraper.rb
So i'm running a scraper on indeed.com but it seems to be unable to find the field q, which is the first field on the left. I'm 100% certain that the code is correct but i'm not sure why it isn't able to view the form. save_and_open_page
CONFIRMS that it was able to view indeed.com successfully... yet is unable to locate the form.
Code:
...ANSWER
Answered 2018-Jan-23 at 23:29Required portions/redirects of the page are loaded from 'indeed.com' rather than 'www.indeed.com' - Change your capybara-webkit configuration to allow indeed.com
.
Additionally, if you want to know what the driver is actually seeing, you're generally better off using save_and_open_screenshot
rather that save_and_open_page
(The latter will show you the html structure but not how capybara-webkit has rendered it)
QUESTION
def perform_search
...ANSWER
Answered 2017-Jan-17 at 23:38click_link
takes parameters to identify the link it's going to click on. To click on the "date" link in the div with id of refineresults you would do
QUESTION
Trying to get the "what" form (aka job title), from indeed.com
Error when trying to run the program:
...ANSWER
Answered 2017-Jan-16 at 18:58Your code only allows the URL http://www.indeed.com
, but that URL redirects to https://www.indeed.com
and also hits http://indeed.com
. Therefore your page load is being blocked. Change to config.allow_url("indeed.com")
and it should be able to find the input.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install job-hunter
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page