Skip to content

Instantly share code, notes, and snippets.

@lyuehh
Created March 23, 2013 07:24
Show Gist options
  • Save lyuehh/5226800 to your computer and use it in GitHub Desktop.
Save lyuehh/5226800 to your computer and use it in GitHub Desktop.
require 'open-uri'
require 'nokogiri'
def check
doc = Nokogiri::HTML(open('http://www.yyets.com/resource/11176'))
doc.css('.f14').each do |l|
if l.to_s.include?('晚上')
puts 'no'
sleep 60 * 30
else
`terminal-notifier -message "可以看了..."`
puts "haha"
exit
end
end
end
while true
check
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment