摘要: 1. 获取某一个节点下所有的文本数据: data = response.xpath('//div[@id="zoomcon"]') content = ''.join(data.xpath('string(.)').extract()) 这段代码将获取,div为某一个特定id的所有文本数据: http://www.nhfpc.gov.cn/fzs/s3576/200804/cdbda975... 阅读全文
posted @ 2015-05-06 15:29 justinzhang 阅读(2424) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install python-mysqldb #!/usr/bin/python #-*-coding:utf-8-*- ''' This file include all the common routine,that are needed in the crawler project. Author: Justnzhang @(uestczhangchao@qq.... 阅读全文
posted @ 2015-05-06 13:57 justinzhang 阅读(1394) 评论(0) 推荐(0) 编辑