mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Remove ssl
This commit is contained in:
parent
0c59d1187e
commit
8da749ee05
@ -2,4 +2,3 @@ pytest
|
||||
requests==2.20.0
|
||||
wheel==0.24.0
|
||||
aiohttp>=3.8.0,<3.9.0
|
||||
certifi
|
||||
|
@ -1,7 +1,6 @@
|
||||
import asyncio # for future uses
|
||||
import aiohttp
|
||||
from telebot import types
|
||||
import ssl, certifi
|
||||
|
||||
try:
|
||||
import ujson as json
|
||||
@ -27,15 +26,14 @@ REQUEST_LIMIT = 50
|
||||
|
||||
class SessionManager:
|
||||
def __init__(self) -> None:
|
||||
self.ssl_context = ssl.create_default_context(cafile=certifi.where())
|
||||
self.session = aiohttp.ClientSession(connector=aiohttp.TCPConnector(
|
||||
limit=REQUEST_LIMIT, ssl=self.ssl_context
|
||||
limit=REQUEST_LIMIT
|
||||
))
|
||||
|
||||
|
||||
async def create_session(self):
|
||||
self.session = aiohttp.ClientSession(connector=aiohttp.TCPConnector(
|
||||
limit=REQUEST_LIMIT, ssl=self.ssl_context
|
||||
limit=REQUEST_LIMIT
|
||||
))
|
||||
return self.session
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user