MCPcopy Create free account
hub / github.com/ComfyWorkflows/ComfyUI-Launcher / check_url_structure

Function check_url_structure

server/utils.py:15–26  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

13from settings import PROJECT_MAX_PORT, PROJECT_MIN_PORT, PROJECTS_DIR
14
15def check_url_structure(url):
16 # Check for huggingface.co URL structure
17 huggingface_pattern = r'^https://huggingface\.co/[\w-]+/[\w-]+/blob/[\w-]+\.(safetensors|bin|ckpt)$'
18 if re.match(huggingface_pattern, url):
19 return True
20
21 # Check for civitai.com URL structure
22 civitai_pattern = r'^https://civitai\.com/models/\d+$'
23 if re.match(civitai_pattern, url):
24 return True
25
26 return False
27
28def slugify(value, allow_unicode=False):
29 """

Callers 1

import_projectFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected