
爬虫
wozaiyizhideng
这个作者很懒,什么都没留下…
展开
-
Python3爬虫实战一之爬取糗事百科段子
参考:静觅 » Python爬虫实战一之爬取糗事百科段子python3 + requests + csv1.抓取糗事百科热门段子2.过滤带有图片的段子3.实现每按一次回车显示一个段子的发布时间,发布人,段子内容,点赞数。4.写入csv文件# -*- coding:utf-8 -*-import reimport timeimport requestsimport sys,os impo...原创 2018-04-22 23:34:18 · 688 阅读 · 0 评论 -
python2 spider 豆瓣电视剧
直接上代码,第一种方式获取不到数据。#.*-coding:utf-8-*-import requestsimport reimport sysreload(sys)sys.setdefaultencoding("utf-8")from lxml import etreeclass spider(object): # 获取url对应的网页源码 def getsour...原创 2018-04-22 23:34:32 · 454 阅读 · 0 评论 -
python2 spider 今日头条
requests + json直接上代码:#!/usr/bin/python# coding=utf-8 import requestsimport jsonurl = 'http://www.toutiao.com/api/pc/focus/'wbdata = requests.get(url).text data = json.loads(wbdata)news = dat...原创 2018-04-22 23:34:00 · 423 阅读 · 0 评论 -
Python3爬虫实战一之爬取网易云音乐热评
参考:爬取了陈奕迅新歌《我们》13万条评论数据发现:原来,有些人只适合遇见https://mp.weixin.qq.com/s/yZCkfu1lPi1yWsuXVRFbPg文中涉及的一些python3模块需要安装:from pyecharts import Barfrom wordcloud import WordCloudimport matplotlib.pyplot as pltsud...转载 2020-06-08 19:14:12 · 677 阅读 · 0 评论 -
Ubuntu 安装Charles,证书设置,代理设置
charles在windows安装就可以抓包。Ubuntu下操作半天没有实现。解决办法找了很久。解决办法链接:https://www.golue.com/news/v251289.html安装:(官方文档的步骤)First install the GPG public key for the repository so you can verify that the packages are correctly signed. The current public key id is 1AD2880转载 2020-06-04 22:04:57 · 2589 阅读 · 0 评论 -
Python3 爬虫--- 问卷星内容爬取
今天面试有个问卷星的笔试题,但是无法复制题目内容。所以爬取一下。import timefrom requests_html import HTMLSessionwenjuanxing_ID = idwenjuanxing_URL = "https://ks.wjx.top/jq/{}.aspx".format(wenjuanxing_ID)def parse_post_data(resp): ''' 解析出问题和选项 ''' questions .原创 2020-06-02 00:17:09 · 6757 阅读 · 0 评论