-
-
Save dca/6166228 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # encoding: utf-8 | |
| # $ ruby check_bot.rb | |
| require 'open-uri' | |
| @url = 'https://registrano.com/events/handlino-new-opening/registrations/new' | |
| def check? | |
| open(@url) do |f| | |
| f.each_line do |line| | |
| if line.include? '抱歉,目前本活動已額滿。' | |
| puts '抱歉,目前本活動已額滿。' | |
| return false | |
| end | |
| end | |
| end | |
| end | |
| while(1) do | |
| system("open #{@url}") if check? | |
| sleep 60 | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment