aheskandani commited on
Commit
9063b65
1 Parent(s): c6cfed4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -11,7 +11,7 @@ from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ForceReply, Rep
11
  import urllib.request
12
  from bs4 import BeautifulSoup
13
 
14
- bot_token = '5415345086:AAFYZJfXygvUzfQARjoADv5eBtcB8qIWp9M'
15
  admin = 37087739
16
 
17
  def start(update: Update, context: CallbackContext):
@@ -21,9 +21,8 @@ def start(update: Update, context: CallbackContext):
21
  def send_captcha(update: Update, context: CallbackContext):
22
  ''' Entry point of conversation this gives buttons to user'''
23
  chat_id = update.effective_chat.id
24
- url = 'https://pooya.um.ac.ir/gateway/SecurityImage/ShowSecurityImage.php?rand=1616724262&rand2=VWRSblpFdzgxd3ZmOExIeUVSc1lCcGhkLzdDYkQ4ODFhYkhwNGptM2RyRT0='
25
  urllib.request.urlretrieve(url, 'captcha.png')
26
- print('Downloaded!')
27
  context.bot.send_photo(chat_id, photo=open('captcha.png', 'rb'))
28
 
29
  if __name__ == '__main__':
@@ -31,4 +30,5 @@ if __name__ == '__main__':
31
  updater.dispatcher.add_handler(CommandHandler('start', start))
32
  updater.dispatcher.add_handler(CommandHandler('img', send_captcha))
33
  updater.start_polling()
34
- print('Bot started ..........')
 
 
11
  import urllib.request
12
  from bs4 import BeautifulSoup
13
 
14
+ bot_token = '5415345086:AAEpiZypEMxgEs5zMcyOBAx_CpT9iLcnE8s'
15
  admin = 37087739
16
 
17
  def start(update: Update, context: CallbackContext):
 
21
  def send_captcha(update: Update, context: CallbackContext):
22
  ''' Entry point of conversation this gives buttons to user'''
23
  chat_id = update.effective_chat.id
24
+ url = 'https://pooya.um.ac.ir/gateway/SecurityImage/ShowSecurityImage.php?rand=596890142&rand2=ZU1mRGRBNFNkVmFObyswQno5aDVjTGdJSWpPZGxXWTFkRHVxVDJkVmlZMD0='
25
  urllib.request.urlretrieve(url, 'captcha.png')
 
26
  context.bot.send_photo(chat_id, photo=open('captcha.png', 'rb'))
27
 
28
  if __name__ == '__main__':
 
30
  updater.dispatcher.add_handler(CommandHandler('start', start))
31
  updater.dispatcher.add_handler(CommandHandler('img', send_captcha))
32
  updater.start_polling()
33
+ print('Bot started ..........')
34
+ updater.idle()