MCPcopy
hub / github.com/ssili126/tv / channel_key

Function channel_key

ZHGXTV.py:700–705  ·  view source on GitHub ↗
(channel_name)

Source from the content-addressed store, hash-verified

698
699
700def channel_key(channel_name):
701 match = re.search(r'\d+', channel_name)
702 if match:
703 return int(match.group())
704 else:
705 return float('inf') # 返回一个无穷大的数字作为关键字
706
707# 对频道进行排序
708results.sort(key=lambda x: (x[0], -float(x[2].split()[0])))

Callers 1

ZHGXTV.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected