爬虫
我也是在别的地方学的
不同林
互相交流 可以加QQ:421065484
展开
-
2021-03-24
爬取斗鱼并制图from selenium import webdriverimport timeimport matplotlib.pyplot as pltimport jiebafrom wordcloud import WordCloudfrom pyecharts.charts import Barfrom pyecharts import options as optsclass DouYuSpider(): def __init__(self): s原创 2021-03-24 22:47:46 · 157 阅读 · 0 评论 -
2021-03-24
爬取三国演义import requestsfrom bs4 import BeautifulSoupimport urllib.parseimport osclass SanGuoSpider(): def __init__(self): self.headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like原创 2021-03-24 22:46:13 · 156 阅读 · 0 评论 -
2021-03-24
爬取香哈菜谱—炒菜做饭无忧虑import requestsfrom lxml import etreeimport reimport openpyxlimport osclass XiangHaSpider(): def __init__(self): self.url = 'https://www.xiangha.com/caipu/c-jiachang/hot-{}/' self.headers = { 'User-Age原创 2021-03-24 22:45:14 · 118 阅读 · 0 评论 -
2021-03-24
爬取豆瓣from selenium import webdriverimport timefrom pyecharts.charts import Barfrom pyecharts import options as optsclass DouBanSpider(): def __init__(self): self.driver = webdriver.Chrome() self.url = 'https://movie.douban.com/'原创 2021-03-24 22:42:08 · 78 阅读 · 0 评论 -
2021-03-24
爬取小说—获得txt文本文件 看书不求人需要安装的文件:pip3 install beautifulsoup4 -i https://pypi.douban.com/simple pip3 install requests -i https://pypi.douban.com/simple代码import requestsfrom bs4 import BeautifulSoupimport osimport time# BeautifulSoup需要安装html5lib解析# 使用转载 2021-03-24 22:10:41 · 121 阅读 · 0 评论