1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2025-01-03 13:35:18 +00:00

no log: remove http adapter from subf2m (no longer needed)

This commit is contained in:
Vitiko 2023-03-03 15:55:47 -04:00
parent ad13f79d19
commit b07786411d

View file

@ -5,15 +5,11 @@ import functools
import logging import logging
import re import re
import time import time
import ssl
import urllib.parse import urllib.parse
from urllib3 import poolmanager
from guessit import guessit from guessit import guessit
from requests import Session from requests import Session
from requests.adapters import HTTPAdapter
from bs4 import BeautifulSoup as bso from bs4 import BeautifulSoup as bso
from guessit import guessit from guessit import guessit
from requests import Session from requests import Session
@ -120,20 +116,6 @@ _LANGUAGE_MAP = {
} }
class _Adapter(HTTPAdapter):
def init_poolmanager(self, connections, maxsize, block=False):
ctx = ssl.create_default_context()
ctx.set_ciphers("DEFAULT@SECLEVEL=0")
ctx.check_hostname = False
self.poolmanager = poolmanager.PoolManager(
num_pools=connections,
maxsize=maxsize,
block=block,
ssl_version=ssl.PROTOCOL_TLS,
ssl_context=ctx,
)
class Subf2mProvider(Provider): class Subf2mProvider(Provider):
provider_name = "subf2m" provider_name = "subf2m"
@ -162,8 +144,6 @@ class Subf2mProvider(Provider):
def initialize(self): def initialize(self):
self._session = Session() self._session = Session()
self._session.mount("https://", _Adapter())
self._session.verify = self._verify_ssl self._session.verify = self._verify_ssl
self._session.headers.update({"user-agent": "Bazarr"}) self._session.headers.update({"user-agent": "Bazarr"})