上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 29 下一页
摘要: 1. 下载thrift 作用:翻译python语言为hbase语言的工具 2. 运行时先启动hbase 再启动thrift,最后在pycharm中通过happybase包连接hbase 在hbase目录下分别运行下面命令行: start-hbase.sh hbase thrift -p 9090 s 阅读全文
posted @ 2019-03-19 13:12 山…隹 阅读(2749) 评论(2) 推荐(0)
摘要: 进入hbase shell命令行 bin/hbase shell HBase Shell; enter 'help' for list of supported commands. Type "exit" to leave the HBase Shell Version 0.92.1, r12989 阅读全文
posted @ 2019-03-14 19:30 山…隹 阅读(423) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-import scrapyfrom scrapy.http import Request,FormRequestclass DbSpider(scrapy.Spider): name = 'db' allowed_domains = ['douban.com'] start_urls = ['https://accounts.d... 阅读全文
posted @ 2019-03-07 22:04 山…隹 阅读(374) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-07 21:47 山…隹 阅读(104) 评论(0) 推荐(0)
摘要: 1. spider代码: 2. items代码: 3. 命令,(job.jl 是文件名字) 阅读全文
posted @ 2019-02-08 21:18 山…隹 阅读(217) 评论(0) 推荐(0)
摘要: 1. 在虚拟机中cd到项目目录,再运行下面代码创建spider文件: scrapy genspider -t crawl test www.baidu.com 2. spider.py代码 3. items代码: 4. pipelines代码: 阅读全文
posted @ 2019-01-28 16:52 山…隹 阅读(181) 评论(0) 推荐(0)
摘要: python 爬虫: srcrapy框架xpath和css选择器语法 Xpath基本语法 一、常用的路径表达式: 举例元素标签为artical标签 二、谓语 谓语被嵌在方括号内,用来查找某个特定的节点或包含某个制定的值的节点 三、通配符 Xpath通过通配符来选取未知的XML元素 表达式| 结果// 阅读全文
posted @ 2019-01-27 19:50 山…隹 阅读(203) 评论(0) 推荐(0)
摘要: 1. 筛选属性包含某字符串的标签(如id = 'bigbaong' 查询包含'big'字符的就可以筛选到) 阅读全文
posted @ 2019-01-26 19:06 山…隹 阅读(2276) 评论(0) 推荐(0)
摘要: 1. 先打开settings.py文件将 'ITEM_PIPELINES'启动(取消注释即可) 2. spider代码 3. pipelines.py代码 4. 补充2,防止item不规范,可以使用items.py文件对其限制(还要改spider中的item代码)(还要修改pipelines中的代码 阅读全文
posted @ 2019-01-26 14:46 山…隹 阅读(247) 评论(0) 推荐(0)
摘要: import scrapy import json class TzcSpider(scrapy.Spider): # spider的名字,唯一 name = 'tzc' # 起始地址 start_urls = ['https://hr.tencent.com/position.php?keywords=python&tid=0&lid=2268'] ... 阅读全文
posted @ 2019-01-21 16:56 山…隹 阅读(170) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 29 下一页