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

Function _normalize_tieba_note_id

cmd_arg/arg.py:139–143  ·  view source on GitHub ↗

Accept a raw Tieba thread id or a /p/ URL.

(value: str)

Source from the content-addressed store, hash-verified

137
138
139def _normalize_tieba_note_id(value: str) -> str:
140 """Accept a raw Tieba thread id or a /p/<id> URL."""
141 value = value.strip()
142 match = re.search(r"/p/(\d+)", value)
143 return match.group(1) if match else value
144
145
146def _normalize_tieba_creator_url(value: str) -> str:

Callers 1

mainFunction · 0.85

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected