PHP记录
摘要:二维数组去重项 代码如下 复制代码 例如: $result = array( 0=>array('a'=>1,'b'=>'Hello'), 1=>array('a'=>1,'b'=>'other'), 2=>array('a'=>1,'b'=>'other'), ); 处理成 $result = a
阅读全文
scrapy shell的使用
摘要:安装IPython pip install IPython==2.4.1 使用方法: scrapy shell http://www.itcast.cn/channel/teacher.shtml response.url:当前响应的url地址response.request.url:当前响应对应的
阅读全文
logging.basicConfig配置文件
摘要:import sys, logging logging.basicConfig(level=logging.INFO, # 日志等级 # filename: 指定日志文件名 format='levelname:%(levelname)s filename: %(filename)s ' 'outpu
阅读全文
scrapy框架--?乱码unicode
摘要:安装 pip install scrapy 建立一个爬虫项目 scrapy startproject 项目名称 scrapy startproject itcast 进入itcast文件夹 生成一个爬虫 scrapy genspider 爬虫名称 "爬虫范围" scrapy genspider it
阅读全文