MCPcopy Create free account
hub / github.com/RASAAS/docmcp-knowledge / classify_source

Function classify_source

scripts/check_standards_versions.py:63–79  ·  view source on GitHub ↗
(url: str)

Source from the content-addressed store, hash-verified

61
62
63def classify_source(url: str) -> str:
64 if "iso.org" in url:
65 return "iso"
66 elif "webstore.iec.ch" in url:
67 return "iec"
68 elif "astm.org" in url or "store.astm.org" in url:
69 return "astm"
70 elif "standards.iteh.ai" in url:
71 return "iteh"
72 elif "eur-lex.europa.eu" in url:
73 return "eurlex"
74 elif "aami.org" in url:
75 return "aami"
76 elif "bsigroup.com" in url:
77 return "bsi"
78 else:
79 return "other"
80
81
82def fetch_page(url: str, max_bytes: int = 8000) -> tuple[int, str]:

Callers 1

load_all_standardsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected