MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / extract_verification_code

Function extract_verification_code

recv_sms.py:46–52  ·  view source on GitHub ↗

Extract verification code of 6 digits from the SMS.

(message: str)

Source from the content-addressed store, hash-verified

44
45
46def extract_verification_code(message: str) -> str:
47 """
48 Extract verification code of 6 digits from the SMS.
49 """
50 pattern = re.compile(r'\b[0-9]{6}\b')
51 codes: List[str] = pattern.findall(message)
52 return codes[0] if codes else ""
53
54
55@app.post("/")

Callers 1

receive_sms_notificationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected