Guest User

Untitled

a guest
Jan 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. puts "Watching #{ARGV[0]}"
  2. changed = false
  3. last = false
  4. until changed
  5. page = `curl #{ARGV[0]}`
  6. unless last == false
  7. changed = page != last
  8. end
  9. last = page
  10. sleep 60
  11. end
  12. File.open("last.html","w+") {|f| f.write last }
  13. File.open("page.html","w+") {|f| f.write last }
  14. puts "Changed!"
  15. puts `diff page.html last.html`
Add Comment
Please, Sign In to add comment