X Tutup
Skip to content

Commit 7d8fcc5

Browse files
committed
update examples
1 parent b83a659 commit 7d8fcc5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/echobot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import 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():
3535
if __name__ == '__main__':
3636
while True:
3737
echo()
38-
time.sleep(5)
38+
time.sleep(3)

examples/roboed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
__author__ = 'leandrotoledodesouza@gmail.com'
77

88
import telegram
9-
import requests
9+
import urllib
1010

1111

1212
def 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

3232
def 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

0 commit comments

Comments
 (0)
X Tutup