Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import urllib.request
- import telebot
- import ssl
- BOT_TOKEN = '418112779:ZZZZzzZzzZzZZzzzzzzzzZzzZzZzZZzzZzZz'
- CHANNEL_NAME = '@inmac'
- BAD = 'Registrations user temporarily disabled'
- bot = telebot.TeleBot(BOT_TOKEN)
- status = ((urllib.request.urlopen('http://inmac.org/profile.php?mode=register').read()).decode("utf-8"))
- openreg = 'Регистрация доступна'
- closedreg = 'Регистрация недоступна'
- work = True
- print(status)
- while (work == True):
- if status.find(BAD):
- bot.send_message(CHANNEL_NAME, closedreg)
- time.sleep(86400)
- else:
- bot.send_message(CHANNEL_NAME, openreg)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement