Skip to content

Commit

Permalink
fix rename error
Browse files Browse the repository at this point in the history
  • Loading branch information
Toperlock committed Aug 24, 2023
1 parent ac8b335 commit 289a6ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def rename(str):
str = '🇸🇬' + ' ' + str
elif re.search('日本|东京|大阪|埼玉|京日|苏日|沪日|上日|穗日|川日|中日|泉日|杭日|深日|辽日|广日|JP|Japan|JAPAN', str) and not (str.startswith('🇯🇵')):
str = '🇯🇵' + ' ' + str
elif re.search('美国|美|京美|硅谷|凤凰城|洛杉矶|西雅图|芝加哥|哥伦布|纽约|America|United States|USA|US', str) and not (str.startswith('🇺🇸')):
elif re.search('美国|美|京美|硅谷|凤凰城|洛杉矶|西雅图|芝加哥|哥伦布|纽约|(?<=[\s-])US(?=[\s-])|USA|America|United States', str) and not (str.startswith('🇺🇸')):
str = '🇺🇸' + ' ' + str
elif re.search('韩国|首尔|韩|韓|春川|KOR|KR|Korea', str) and not (str.startswith('🇰🇷')):
str = '🇰🇷' + ' ' + str
Expand All @@ -36,7 +36,7 @@ def rename(str):
str = '🇲🇾' + ' ' + str
elif re.search('土耳其|伊斯坦布尔|TR|TR-|TR_|TUR|Turkey', str) and not (str.startswith('🇹🇷')):
str = '🇹🇷' + ' ' + str
elif re.search('阿根廷|AR|Argentina', str) and not (str.startswith('🇦🇷')):
elif re.search('阿根廷|(?<=[\s-])AR(?=[\s-])|Argentina', str) and not (str.startswith('🇦🇷')):
str = '🇦🇷' + ' ' + str
else:
str = str
Expand Down

0 comments on commit 289a6ff

Please sign in to comment.