mirror of
https://github.com/littlecodersh/ItChat.git
synced 2026-10-28 21:41:00 +08:00
14 lines
411 B
Python
14 lines
411 B
Python
import re
|
|
|
|
import os
|
|
import config
|
|
|
|
def clear_screen():
|
|
os.system('cls' if config.OS == 'Windows' else 'clear')
|
|
def emoji_dealer(l):
|
|
regex = re.compile('^(.*?)(?:<span class="emoji (.*?)"></span>(.*?))+$')
|
|
for m in l: # because m is dict so can be used like this
|
|
match = re.findall(regex, m['NickName'])
|
|
if len(match) > 0: m['NickName'] = ''.join(match[0])
|
|
return l
|