print response json proxy

This commit is contained in:
Roy Olav Purser 2021-11-19 12:21:46 +01:00
parent a0636187d6
commit 2077673849
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -54,8 +54,11 @@ class ProxyElem():
if isinstance(url, str):
data["upstream"] = url
elif isinstance(url, tuple):
if isinstance(url[0], str):
data["upstream"] = url[0]
if isinstance(url[1], str):
data["ctype"] = url[1]
data["proxy"] = self.proxy
data["proxied"] = isinstance(self.proxy, str)
data_list.append(data)
@ -64,6 +67,7 @@ class ProxyElem():
print(data_list)
resp = await session.post(proxy_server, json=data_list)
text = await resp.text()
print(text)
jdata = json.loads(text)
except Exception as e:
logger.info(e)