01 2018 档案

摘要:私密代理 阅读全文
posted @ 2018-01-25 17:26 zy-- 阅读(283) 评论(2) 推荐(0) 编辑
摘要:#coding:utf-8 import urllib2 proxyswitch = True httpproxy_handler = urllib2.ProxyHandler({"http":"211.159.177.212:3128"}) nullproxy_handler = urllib2.ProxyHandler({}) if proxyswitch: opener =... 阅读全文
posted @ 2018-01-25 16:50 zy-- 阅读(623) 评论(1) 推荐(0) 编辑
摘要:#coding:utf-8 import urllib2 #构建一个HTTPandler处理对象,支持处理HTTP的请求 http_handler = urllib2.HTTPHandler() #调用build_opener()方法构建一个自定义的opener对象,参数是构建的处理器对象 opener = urllib2.build_opener(http_handler) request... 阅读全文
posted @ 2018-01-25 15:09 zy-- 阅读(337) 评论(1) 推荐(0) 编辑
摘要:#coding:utf-8 import urllib2 url = "http://www.renren.com/247277361/profile" headers = { "host":"www.renren.com", "connection":"keep-alive", #"upgrade-insecure-requests":"1", "use... 阅读全文
posted @ 2018-01-25 00:33 zy-- 阅读(177) 评论(0) 推荐(0) 编辑
摘要:#coding:utf-8 import urllib import urllib2 url = "https://movie.douban.com/j/new_search_subjects?" headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, li... 阅读全文
posted @ 2018-01-24 23:54 zy-- 阅读(108) 评论(0) 推荐(0) 编辑
摘要:Samba是在Linux和UNIX系统上实现SMB协议的⼀个免费软件 在win10访问共享文件时,能链接上,但拒绝访问,未解决。 阅读全文
posted @ 2018-01-24 20:16 zy-- 阅读(116) 评论(0) 推荐(0) 编辑
摘要:0 0 #coding:utf-8 import urllib import urllib2 def loadPage(url,filename): ''' 作用:根据url发送请求,获取服务器响应文件 url:需要爬去的url地址 filename : 处理的文件名 ''' print "正在下载 阅读全文
posted @ 2018-01-21 19:56 zy-- 阅读(723) 评论(0) 推荐(0) 编辑
摘要:# coding:utf-8 import urllib import urllib2 url = "http://wwww.baidu.com/s" headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3... 阅读全文
posted @ 2018-01-19 18:32 zy-- 阅读(299) 评论(0) 推荐(0) 编辑
摘要:下载地址:https://www.telerik.com/fiddler APP手机爬取(转:http://blog.csdn.net/c406495762/article/details/76850843) 阅读全文
posted @ 2018-01-15 22:20 zy-- 阅读(87) 评论(0) 推荐(0) 编辑
摘要:# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html impo... 阅读全文
posted @ 2018-01-12 00:48 zy-- 阅读(260) 评论(1) 推荐(0) 编辑
摘要:spider.py文件配置 1 2 # -*- coding: utf-8 -*- 3 import scrapy 4 from itTeachers.items import ItteachersItem 5 6 7 class ItcastSpider(scrapy.Spider): 8 name = 'itcast' 9 allo... 阅读全文
posted @ 2018-01-11 18:45 zy-- 阅读(720) 评论(3) 推荐(0) 编辑
摘要:1 如果是剛安裝完的搜狗輸入法,則輸入: sudo apt-get install -f,進行依賴性檢查,判斷是否缺依賴項。如果是之前一直可以输入中文的,突然无法输入的,则不是依赖项的问题,进行下一步。 如果是剛安裝完的搜狗輸入法,則輸入: sudo apt-get install -f,進行依賴性 阅读全文
posted @ 2018-01-11 16:43 zy-- 阅读(384) 评论(0) 推荐(0) 编辑
摘要:转:http://blog.csdn.net/emperor_cj/article/details/78603026 一、linux环境 1 二、安装和配置虚拟环境 安装虚拟环境 1 2 virtualenvwrapper 是virtualenv的扩展管理包,可以将所有的虚拟环境整合在一个目录下。 阅读全文
posted @ 2018-01-10 15:19 zy-- 阅读(129) 评论(0) 推荐(0) 编辑
摘要:24 quote = each.xpath(".//p[@class='quote']/span/text()").extract() 25 if len(quote) != 0: 26 item['quote'] = quote[0] 27 28 29 yield item 30 31 if se 阅读全文
posted @ 2018-01-09 00:53 zy-- 阅读(362) 评论(0) 推荐(0) 编辑
摘要:UBUNTU16.04,以python2.7创建了环境py2scrapy, pip install pymongo, import pymongo 在爬虫中出现错误:ImportError: No module named 'pymongo' how do you find where pip in 阅读全文
posted @ 2018-01-08 17:33 zy-- 阅读(6001) 评论(0) 推荐(0) 编辑
摘要:转 http://blog.csdn.net/zhushh/article/details/52451441 启动,重启,关闭 阅读全文
posted @ 2018-01-07 22:11 zy-- 阅读(108) 评论(0) 推荐(0) 编辑
摘要:检查端口 yun@ubuntu:~$ ps aux | grep mongodyun 95119 0.5 3.2 950384 65296 pts/7 Sl+ 21:24 0:08 mongodyun 95278 0.0 0.0 21292 940 pts/20 S+ 21:50 0:00 grep 阅读全文
posted @ 2018-01-07 21:54 zy-- 阅读(557) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示