aheskandani commited on
Commit
fcee93f
1 Parent(s): 8e31d0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -12,6 +12,7 @@ import requests
12
  import hashlib
13
  from random import randint
14
  from bs4 import BeautifulSoup
 
15
 
16
  bot_token = '5415345086:AAEpiZypEMxgEs5zMcyOBAx_CpT9iLcnE8s'
17
  admin = 37087739
@@ -26,8 +27,10 @@ def send_captcha(update: Update, context: CallbackContext):
26
  context.bot.send_message(chat_id, text='Salam')
27
  url = captcha_url()
28
  context.bot.send_message(chat_id, text=url)
 
29
  urllib.request.urlretrieve(url, 'captcha.png')
30
  context.bot.send_message(chat_id, text='Downloaded')
 
31
  context.bot.send_photo(chat_id, photo=open('captcha.png', 'rb'))
32
 
33
  def captcha_url():
 
12
  import hashlib
13
  from random import randint
14
  from bs4 import BeautifulSoup
15
+ import urllib.request
16
 
17
  bot_token = '5415345086:AAEpiZypEMxgEs5zMcyOBAx_CpT9iLcnE8s'
18
  admin = 37087739
 
27
  context.bot.send_message(chat_id, text='Salam')
28
  url = captcha_url()
29
  context.bot.send_message(chat_id, text=url)
30
+ context.bot.send_photo(chat_id, photo=url)
31
  urllib.request.urlretrieve(url, 'captcha.png')
32
  context.bot.send_message(chat_id, text='Downloaded')
33
+
34
  context.bot.send_photo(chat_id, photo=open('captcha.png', 'rb'))
35
 
36
  def captcha_url():