分类: Python

116 篇文章

python解析html获取节点的内容
[video url="" /] 在爬取网页的时候,爬下的数据需要解析html。如下代码。 使用python3.x from bs4 import BeautifulSoup as bs html = '''<html> <head> <title class='ceshi'>super 哈哈 star</…
thumbnail
wordclound词云图不清晰问题
之前搞词云图产生的图片发现不清晰,没有深究啥原因。 wc = WordCloud( # scale=32, #保证生成的图片更加清晰 background_color='white', mask=img_array, font_path=r"C:\Windows\Fonts\STKAITI.TTF" # 字体位置C:\Windo…
thumbnail
如何更换jupyter的默认目录?
首先打开终端,运行一下命令 jupyter notebook --generate-config 结果如下: 复制路径,前往文件夹 ![image-20221002122948808](/Users/zhangzhiqi/Library/Mobile Documents/M6HJR9W95L~com~textasticapp~textastic/D…