CF Come unico metodo per httptools

This commit is contained in:
Alhaziel
2019-12-17 21:19:30 +01:00
parent f647347235
commit 2923bbed79
2 changed files with 17 additions and 8 deletions

View File

@@ -163,6 +163,9 @@ class CloudScraper(Session):
def request(self, method, url, *args, **kwargs):
# pylint: disable=E0203
from time import time
from platformcode import logger
start= time()
if kwargs.get('proxies') and kwargs.get('proxies') != self.proxies:
self.proxies = kwargs.get('proxies')
@@ -197,7 +200,7 @@ class CloudScraper(Session):
else:
if not resp.is_redirect and resp.status_code not in [429, 503]:
self._solveDepthCnt = 0
logger.debug('CF TIME= '+str(time()-start))
return resp
# ------------------------------------------------------------------------------- #