Answer the question
In order to leave comments, you need to log in
I don't understand why doesn't the bot not work?
Here is the code:
import telebot
import parser
TOKEN = '1190811079:AAEui3GQq1yJOk8pivrcjA8cVMIFBi1lI0A'
bot = telebot.TeleBot(TOKEN)
@bot.message_handler(commands=['start', 'go'])
def start_handler(message):
bot.send_message(message.chat.id, 'Привет, когда я вырасту, я буду парсить заголовки с Хабра')
bot.polling()
2020-05-09 18:36:30,423 (util.py:65 PollingThread) ERROR - TeleBot: "SSLError occurred, args=(MaxRetryError("HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot1190811079:AAEui3GQq1yJOk8pivrcjA8cVMIFBi1lI0A/getUpdates?offset=1&timeout=20 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)')))"),)
Answer the question
In order to leave comments, you need to log in
For local testing, use a proxy or Windscribe. And never post the token, you will be left without a bot :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question