A simple emoji picker for rofi with multi-selection
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

extract_emojis.py 455B

1234567891011121314151617
  1. import requests
  2. from bs4 import BeautifulSoup
  3. data = requests.get('https://emojipedia.org/emoji/') # type: requests.Response
  4. soup = BeautifulSoup(data.content, 'lxml') # type: BeautifulSoup
  5. python_file = open('emojis.py', 'w')
  6. python_file.write('emojis="""\n')
  7. for table_row in soup.find_all('tr'):
  8. emoji_row = table_row.find('td')
  9. text = emoji_row.get_text()
  10. python_file.write(text + '\n')
  11. python_file.write('"""')
  12. python_file.close()