From ef0771693127f39f2e1b35595d97b0ae98e9d1a7 Mon Sep 17 00:00:00 2001 From: xingren23 Date: Tue, 26 Mar 2024 12:07:02 +0800 Subject: [PATCH] fix: is_url --- build/COPY_ROOT/opt/serverless/utils/network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/COPY_ROOT/opt/serverless/utils/network.py b/build/COPY_ROOT/opt/serverless/utils/network.py index a50cadf7..4b7bb58f 100644 --- a/build/COPY_ROOT/opt/serverless/utils/network.py +++ b/build/COPY_ROOT/opt/serverless/utils/network.py @@ -12,7 +12,8 @@ def __init__(self): @staticmethod def is_url(value): try: - return bool(urlparse(value)[0]) + result = urlparse(value) + return all([result.scheme, result.netloc]) except: return False