From ad90d1d263058ff7be6d5822b995a72e3de4e96d Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Sun, 6 Sep 2020 12:54:26 +0100 Subject: [PATCH] updates --- komrade/backend/mazes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/komrade/backend/mazes.py b/komrade/backend/mazes.py index 76eda51..a3ab32b 100644 --- a/komrade/backend/mazes.py +++ b/komrade/backend/mazes.py @@ -1,6 +1,6 @@ import os,sys; sys.path.append(os.path.abspath(os.path.join(os.path.abspath(os.path.join(os.path.dirname(__file__),'..')),'..'))) from komrade import * -import requests_async +# import requests_async as requests log=print @@ -16,12 +16,12 @@ def tor_request_in_proxy(url): return s.get(url,timeout=60) async def tor_request_in_python_async(url): - import requests_async + import requests_async as requests tor = TorClient() with tor.get_guard() as guard: adapter = TorHttpAdapter(guard, 3, retries=RETRIES) - async with requests_async.Session() as s: + async with requests.Session() as s: # await s s.headers.update({'User-Agent': 'Mozilla/5.0'}) s.mount('http://', adapter)