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_result_str = ''.join(data_result)
w = wordcloud.WordCloud(font_path=r'C:WindowsFonts微软雅黑msyhbd') ##选择字体
w.generate(data_result_str)
w.to_file('outfile.png') ##输出png