oxtime

import requests
import re
import wordcloud
import imageio
import jieba
response = requests.get(\'http://www.haha56.net/xiaohua/gushi/list_1_2.html\')
response.encoding=\'gbk\'
data = response.text
data_result = re.findall(\'

(.*?)
\',data)
data_result_str = \'\'.join(data_result)
w = wordcloud.WordCloud(font_path=r\'C:\Windows\Fonts\微软雅黑\msyhbd\') ##选择字体
w.generate(data_result_str)
w.to_file(\'outfile.png\') ##输出png

分类:

技术点:

相关文章:

  • 2021-12-08
  • 2021-12-25
  • 2021-12-08
  • 2022-01-07
  • 2021-12-29
  • 2021-12-20
  • 2021-12-16
  • 2021-04-05
猜你喜欢
  • 2021-12-12
  • 2021-08-29
  • 2021-07-05
  • 2021-09-27
  • 2021-10-27
  • 2021-12-20
  • 2021-10-09
相关资源
相似解决方案