Created
July 4, 2020 18:20
-
-
Save AlessandroMinali/dbd371c73d8c1451b5c30faacd1204df to your computer and use it in GitHub Desktop.
Quickly scan all of helpx for jobs.
This file contains 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
require 'capybara/poltergeist' | |
session = Capybara::Session.new(:poltergeist) | |
puts "Search for: " | |
input = gets.chomp | |
[1,2,3,4,5,9].each do |i| | |
session.visit( | |
"https://www.helpx.net/hostlist.asp?search=#{input}&network=#{i}" | |
) | |
next unless session.find('body > div > table > tbody > tr > td > center') | |
`open "https://www.helpx.net/hostlist.asp?search=#{input}&network=#{i}"` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment