摘要:
1. 获取某一个节点下所有的文本数据: data = response.xpath('//div[@id="zoomcon"]')
content = ''.join(data.xpath('string(.)').extract())
这段代码将获取,div为某一个特定id的所有文本数据: http://www.nhfpc.gov.cn/fzs/s3576/200804/cdbda975... 阅读全文
摘要:
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.... 阅读全文