Всем привет, столкнулся со следующей проблемой:
Код:
C:\Users\PC\AppData\Local\Programs\Python\Python37-32\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py:865: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
Почти 4 часа ковыряюсь, ничего так и не получилось :( Знатоки, помогите
Код:
# -*- coding: utf-8 -*-
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
REQUEST_KWARGS={
'proxy_url': 'socks4://171.103.9.22:4145/',
'urllib3_proxy_kwargs': {
'assert_hostname': 'False',
'cert_reqs': 'CERT_NONE'
}
}
updater = Updater(token='', use_context=True, request_kwargs=REQUEST_KWARGS)
dispatcher = updater.dispatcher
def startCommand(bot, update):
bot.send_message(chat_id=update.message.chat_id, text='Как жизнь?')
def textMessage(bot, update):
response = 'Получено сообщение -> ' + update.message.text
bot.send_message(chat_id=update.message.chat_id, text=response)
start_command_handler = CommandHandler('start', startCommand)
text_message_handler = MessageHandler(Filters.text, textMessage)
dispatcher.add_handler(start_command_handler)
dispatcher.add_handler(text_message_handler)
updater.start_polling(clean=True)
updater.idle()
P.S.: (Это не помогает)
Код:
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
Код:
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
Запускаю на win7, vpn не помог :(