'requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='api.telegram.org', port=443): # python telegram bot using pytelegrambotapi and Tor

When I want to connect to telegram bot using Tor that returns error blow

requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot/getUpdates?offset=1&timeout=20 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f28923f4a30>, 'Connection to api.telegram.org timed out. (connect timeout=20)'))



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source