会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
whz_it
博客园
首页
新随笔
联系
订阅
管理
2018年9月23日
scrapy抓取某些样式的博客园博客信息
摘要: 测试过很多样式的博客园,就发现长书这样的也就是我的博客这样的抓取不了,标签不一样。其他的只需要把bky.py下的user的值即‘username’改为要抓取的用户的用户名即可,如: user = "whz0215"。 代码如下: spiders下的bky.py 以上为只需要输入用户名即可,以下为需要
阅读全文
posted @ 2018-09-23 22:39 whz_it
阅读(252)
评论(0)
推荐(0)
2018年9月19日
模拟登陆汽车之家
摘要: from io import BytesIOfrom PIL import Imagefrom selenium import webdriverfrom selenium.webdriver import ActionChainsfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui impor...
阅读全文
posted @ 2018-09-19 19:52 whz_it
阅读(391)
评论(0)
推荐(0)
2018年9月2日
模拟登陆qq空间发说说
摘要: import requests # network find this "https://user.qzone.qq.com/proxy/domain/taotao.qzone.qq.com/cgi-bin/emotion_cgi_publish_v6?" \ "qzonetoken=470760640509be33e4600487e349de76ff1e48aa6e1792a46c3e5f3...
阅读全文
posted @ 2018-09-02 23:06 whz_it
阅读(283)
评论(0)
推荐(0)
Xpath使用
摘要: import requests from lxml import etree # xpath def get_baidu_music(): url = "http://music.taihe.com/top/dayhot" response = requests.get(url) html = response.content.decode("utf-8") re...
阅读全文
posted @ 2018-09-02 23:06 whz_it
阅读(103)
评论(0)
推荐(0)
2018年7月18日
selenium+chromedriver爬取淘宝美食信息保存到MongoDB
摘要: 配置文件 代码实现
阅读全文
posted @ 2018-07-18 16:58 whz_it
阅读(337)
评论(0)
推荐(0)
2018年7月17日
ip代理池抓取qq音乐热歌前300
摘要: 本程序从网上抓取免费代理IP存到文件,然后用抓取的IP抓取百度首页测试其是否可用,再用Flask框架搭建一个本地接口,可从此接口获取代理池中的代理IP,用此代理池中获取的IP抓取qq音乐热歌榜前300的歌曲信息保存到文件 从西刺代理获取代理IP 检测IP是否可用 用Flask框架搭建本地API以获取
阅读全文
posted @ 2018-07-17 16:53 whz_it
阅读(301)
评论(0)
推荐(0)
2018年5月31日
is&==©
摘要: is与==的区别 a = [1,2,3] b = [1,2,3] a == b ==>True a is b ==>False 数字在-5到256时如: a = 1 b = 1 a is b ==> Trueis判断两个引用是否指向同一对象(地址),引用比较 a = [1,2,3],b = [1,2
阅读全文
posted @ 2018-05-31 19:03 whz_it
阅读(134)
评论(0)
推荐(0)
2018年4月15日
bash环境变量配置
摘要: bash的配置文件 按生效范围划分 全局配置: /etc/profile /etc/profile.d/*.sh /etc/bashrc 个人配置: ~/.bash_profile ~/.bashrc 按功能划分,存在两类 profile类:为交互式登录的shell提供配置 全局:/etc/prof
阅读全文
posted @ 2018-04-15 16:41 whz_it
阅读(411)
评论(0)
推荐(0)
打包及压缩工具
摘要: 压缩,解压缩工具 compress/uncompress: .z gzip/gunzip: .gz bzip2/bunzip2: .bz2 xz/unxz: .xz zip/unzip: tar cpio 1,gzip/gunzip/zcat 压缩或解压缩后会删除原文件 gizp [option]
阅读全文
posted @ 2018-04-15 16:32 whz_it
阅读(133)
评论(0)
推荐(0)
2018年4月10日
ssh+ftp+1
摘要: 使用subprocess和ThreadingTCPServer实现并发的ssh与ftp服务器,可以实现常用的cd,ls,mkdir,touch等包括其带参数的命令,more命令在小文件上行,也就是不是一次性获取结果命令还不能实现,等再研究研究,能实现文件上传下载,有一定的容错能力。
阅读全文
posted @ 2018-04-10 21:21 whz_it
阅读(222)
评论(0)
推荐(0)
下一页
公告