File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 66import time
77
88# Telegram Bot Authorization Token
9- bot = telegram .Bot ('token ' )
9+ bot = telegram .Bot ('TOKEN ' )
1010
1111# This will be our global variable to keep the latest update_id when requesting
1212# for updates. It starts with the latest update_id available.
@@ -35,4 +35,4 @@ def echo():
3535if __name__ == '__main__' :
3636 while True :
3737 echo ()
38- time .sleep (5 )
38+ time .sleep (3 )
Original file line number Diff line number Diff line change 66__author__ = 'leandrotoledodesouza@gmail.com'
77
88import telegram
9- import requests
9+ import urllib
1010
1111
1212def main ():
13- bot = telegram .Bot ('token ' ) # Telegram Bot Authorization Token
13+ bot = telegram .Bot ('TOKEN ' ) # Telegram Bot Authorization Token
1414
1515 global LAST_UPDATE_ID
1616 LAST_UPDATE_ID = bot .getUpdates ()[- 1 ].update_id # Get lastest update
@@ -31,7 +31,7 @@ def main():
3131
3232def ed (text ):
3333 url = 'http://www.ed.conpet.gov.br/mod_perl/bot_gateway.cgi?server=0.0.0.0%3A8085&charset_post=utf-8&charset=utf-8&pure=1&js=0&tst=1&msg=' + text
34- data = requests . get (url ).content
34+ data = urllib . urlopen (url ).read ()
3535
3636 return data .strip ()
3737
You can’t perform that action at this time.
0 commit comments