From 207767384947cac439ecc84ab000141a066133fa Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 19 Nov 2021 12:21:46 +0100 Subject: [PATCH] print response json proxy --- backend/stream.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/stream.py b/backend/stream.py index 368c9fc..bf88a17 100755 --- a/backend/stream.py +++ b/backend/stream.py @@ -54,8 +54,11 @@ class ProxyElem(): if isinstance(url, str): data["upstream"] = url elif isinstance(url, tuple): - data["upstream"] = url[0] - data["ctype"] = url[1] + 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)