MCPcopy
hub / github.com/pluwen/awesome-testflight-link / parse_links

Function parse_links

scripts/batch_add_link.py:31–44  ·  view source on GitHub ↗

Extract link IDs from a multi-line/comma-separated raw string.

(raw: str)

Source from the content-addressed store, hash-verified

29
30
31def parse_links(raw: str) -> list[str]:
32 """Extract link IDs from a multi-line/comma-separated raw string."""
33 link_ids = []
34 for line in raw.replace(',', '\n').splitlines():
35 line = line.strip()
36 if not line:
37 continue
38 # Support full URLs or just the join code
39 match = re.search(r"join/([A-Za-z0-9]+)$", line, re.I)
40 if match:
41 link_ids.append(match.group(1))
42 elif re.fullmatch(r"[A-Za-z0-9]+", line):
43 link_ids.append(line)
44 return link_ids
45
46
47async def check_status(session, key, retry=10):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected