Skip to content

Commit

Permalink
fix regexp deeptranslator proxy check
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekPet committed Sep 5, 2024
1 parent 5869b91 commit 15e34d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions DeepTranslatorNode/deep_translator_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
empty_str = re.compile(r"^\s*$", re.I | re.M)
remove_brackets_reg = re.compile(r"[\[\]]*")
key_val_reg = re.compile(r"^[\w-]+=[^=][.\w-]*$", re.I)
key_val_proxy_reg = re.compile(
r"^[https]+=[^=]((?:\d{1,3}\.){1,3}\d{1,3}):(\d{1,5})$", re.I
)
key_val_proxy_reg = re.compile(r"^https?=\d{1,3}(?:\.\d{1,3}){3}:\d{1,5}$", re.I)
service_correct_reg = re.compile(r"\s*\[.*\]")
check_proxy_reg = re.compile(r"\d{1,3}\.\d{1,3}\.\d{1,3}\:\d+")

Expand Down Expand Up @@ -516,6 +514,8 @@ def deep_translator_function(
}
}
)
proxies_info = ", ".join([f"{prop}={val}" for prop, val in prop_data["proxies"].items()])
print(f"[Deep Translator] Proxy is enabled. Proxies: {proxies_info}")
else:
print("[Deep Translator] Proxy disabled or input field is empty!")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui_custom_nodes_alekpet"
description = "Nodes: PoseNode, PainterNode, TranslateTextNode, TranslateCLIPTextEncodeNode, DeepTranslatorTextNode, DeepTranslatorCLIPTextEncodeNode, ArgosTranslateTextNode, ArgosTranslateCLIPTextEncodeNode, PreviewTextNode, HexToHueNode, ColorsCorrectNode, IDENode."
version = "1.0.26"
version = "1.0.27"
license = { file = "LICENSE" }

[project.urls]
Expand Down

0 comments on commit 15e34d7

Please sign in to comment.