Script to see job posted in fossjobs today


Yesterday I wrote a small script in ruby after i saw about ‘Nokogiri’ gem in ruby

Nokogiri is html/xml parser which  more faster than ‘Hpricot’.

Nokogiri Installation

sudo apt-get install ruby libxml2 libxml2-dev libxslt-dev ruby-dev

sudo apt-get install rubygems


sudo gem install nokogiri

Code which I written was , It will see website for job which was posted today . If there is no job posted today it will show result as ‘Job not found today’ as output .

If there is job posted today , It will ask for mobile numbers , You can give any number of mobile you want . Then it will send to all numbers about Job  title  which was posted today

require  'rubygems'
require 'nokogiri'
require 'open-uri'
require 'net/http'
require 'uri'
t =
date = t.strftime("%m-%d-%Y")
date = '21-05-2011'
# Get a Nokogiri::HTML:Document for the page we’re interested in...

doc = Nokogiri::HTML(open(''))

# Do funky things with it using Nokogiri::XML::Node methods...

# Search for nodes by css
job = nil
doc.css('#content div span').each do |link|
  if link.content.include? date
     job = link.parent.children.css('span.row-info a').text
if job.nil?
  job = 'Job Not Posted Today'
  puts job
  print 'Enter your mobile number (seperated by comas):'
  mob = gets
 mob.each do |num|
   Net::HTTP.get_print URI.parse(''+job.gsub(' ', '')+'&senderid=12345678&recipient='+num)

for testing you can give default date as ’21-05-2011′ in same format in code above


date = ’21-05-2011′

. This is will return ‘LinuxSystemAdminstator-Immediate’

you can Check all job updates from your script 🙂

Thank u




About sathia

Web developer at cloudmint
This entry was posted in programs and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s