摘要: import requests as rfrom bs4 import BeautifulSoup import matplotlib.pyplot as pdef gethtmltext(url): try: a=r.get(url,timeout=30) a.raise_for_status() 阅读全文
posted @ 2020-05-10 19:49 熊凌宇 阅读(206) 评论(0) 推荐(0)
摘要: 本来想做一个歌词的爬虫,但是。。。 个人水平有限。。。只爬下来了这个东西 <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>百度百科——全球最大中文百科全书</title> <style> p { margin 阅读全文
posted @ 2020-05-03 16:41 熊凌宇 阅读(192) 评论(0) 推荐(0)
摘要: import wordcloudimport jiebaf=open("少年中国说词云.txt","r",encoding="utf-8")t=f.read()f.close()txt=" ".join(jieba.lcut(t))w=wordcloud.WordCloud(font_path="m 阅读全文
posted @ 2020-04-10 17:48 熊凌宇 阅读(227) 评论(0) 推荐(0)