Files
douyin_guaji-main/tools/test_extract_prize.py
T

19 lines
352 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from douyin.utils.douyin_utils import extract_prize_value_yuan
tests = [
"¥12.34",
"¥12·34",
"¥12.34",
"¥12.34",
"12.34元",
"12,345.67",
"¥O2.5O",
"¥1O.5",
"价值:12.5",
"价值12。5",
"价值12·5",
"随机文本 0.5 元",
]
for t in tests:
print(t, "->", extract_prize_value_yuan(t))