1 # 把上图转换为下图,unie573转换为58739
 2 FONT_DICT = {58739: '1', 58275: '2', 63321: '3', 63537: '4', 58042: '5', 59755: '6', 59348: '7', 63702: '8', 60197: '9', 61011: '0',}
 3 def get_font_w(content):
 4     if len(content) == 0:
 5         return ''
 6     content = str(content).replace('&#', '0')
 7     # 例如 <span class="new_font">新的字体格式:舒</span>
 8     # 如何获取该内容,这是个问题<span class="new_font">新的字体格式:舒</span>
 9     for key in FONT_DICT.keys():
10         key_16 = hex(key)
11         initstr = str(key_16) + ';'
12         content = content.replace(initstr, str(FONT_DICT[key]))
13     # <span class="new_font">新的字体格式:舒适型</span>
14     print(content)