![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
coding上下求索
学无止境,吾将上下而求索!
QQ:743701947 欢迎一起交流学习
The greater the ability, the greater the responsibility.
展开
-
爬取csdn上的归档部分绘制写作历史
爬取了CSDN上的归档部分的内容,并且绘制写作的历史进程,看看自己的水平。直接上程序:# -*- coding: utf-8 -*-import numpy as npimport matplotlib.pyplot as pltimport requestsimport refrom matplotlib.font_manager import FontProperties...原创 2019-05-02 17:06:51 · 7903 阅读 · 0 评论 -
python投票脚本简易版
用到的配置为:Anaconda 4.2.0(64-bit)Python 3.5.2程序为:from bs4 import BeautifulSoupfrom urllib.request import urlopenfrom urllib.request import Requestimport requestsimport timedef get_ip_list(...原创 2018-07-07 13:47:51 · 5066 阅读 · 1 评论 -
python虫虫(平凡之路)
爬取单一网页上的内容,并保存到txt文档内,以小说排行榜首页为例:import requestsimport timeimport reurl = 'http://top.baidu.com/buzz/book.html'res = requests.get(url)res.encoding = 'gb2312'kk = '<a class=".*?" tar...原创 2018-07-08 18:37:58 · 3441 阅读 · 0 评论 -
python虫虫(抖音歌曲大全)
配置说明:Anaconda 4.2.0(64-bit)Python 3.5.2程序:import requestsimport reimport timeurl = 'https://www.phb123.com/yule/music/23816.html'r = requests.get(url)r.encoding = 'utf-8'url_li...原创 2018-07-10 16:43:04 · 4673 阅读 · 0 评论 -
python虫虫BeautifulSoup与re的比较(通过实战)
分别用正则的方式和BeautifulSoup的方式爬取情歌排行榜上的信息配置环境:Anaconda 4.2.0 (64-bit)Python 3.5.2from bs4 import BeautifulSoupimport requestsimport reimport time1、BeautifulSoup的方式,注意find()和find_all()的使用。n ...原创 2018-07-10 21:41:52 · 6138 阅读 · 0 评论