NFLmusic库文件
This commit is contained in:
17
nflmusic/decode_format.py
Normal file
17
nflmusic/decode_format.py
Normal file
@ -0,0 +1,17 @@
|
||||
import re
|
||||
|
||||
|
||||
def decode_format(value):
|
||||
match = re.match(r'(\d+):(\d)', value)
|
||||
if match:
|
||||
minute = int(match.group(1))
|
||||
second = int(match.group(2))
|
||||
time = minute * 60 + second
|
||||
return time
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
value = input("输入转换的时间戳:")
|
||||
print(decode_format(value))
|
Reference in New Issue
Block a user