上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 53 下一页
摘要: 直接上源码: 1 import pymysql 2 3 db = pymysql.connect(host='localhost', 4 port=3306, 5 user='root', 6 passwd='zb753951', 7 db='pareci') 8 def select_db(): 阅读全文
posted @ 2020-02-03 15:48 博二爷 阅读(483) 评论(0) 推荐(0) 编辑
摘要: jieba库有三种模式 精确模式、全模式、搜索引擎模式 - 精确模式:把文本精确的切分开,不存在冗余单词 - 全模式:把文本中所有可能的词语都扫描出来,有冗余 - 搜索引擎模式:在精确模式基础上,对长词再次切分 应用实例: 代码: 1 import jieba 2 3 file = open('E: 阅读全文
posted @ 2020-02-02 23:16 博二爷 阅读(1992) 评论(0) 推荐(0) 编辑
摘要: 百度百科特征: https://baike.baidu.com/item/+“信息” 切记不要在要查找的字后面加‘/’ 简介代码XPATH: 1 String htmls=page.getHtml().xpath("//div[@class='lemma-summary']/html()").get 阅读全文
posted @ 2020-02-02 18:30 博二爷 阅读(746) 评论(0) 推荐(0) 编辑
摘要: 爬取思路: 1,在首页上爬取这些推荐博文:https://www.cnblogs.com/ 2,根据这些推荐博文进一步到发布这些推荐博文的博主主页中: 3,爬取标签的话可以查看这些博主的标签 只用在博主主页后加一个/tag/就可以跳转到标签页中 4,如果要爬取内容的话,就可以进入这些博主的所有页面中 阅读全文
posted @ 2020-02-01 22:49 博二爷 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 page.addTargetRequests( 2 page.getHtml().xpath("//div[@class='rinfo']/a/@href").all()); 实战代码: 阅读全文
posted @ 2020-01-31 23:18 博二爷 阅读(503) 评论(0) 推荐(0) 编辑
摘要: ajax 代码: $.ajax({ type : "post", async : true, url : "${pageContext.request.contextPath}/charts", type:"POST", data: { "method":"huizhu" }, dataType:" 阅读全文
posted @ 2020-01-31 21:54 博二爷 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 含有最简单的页面ajax 申请数据库数据,echarts显示 示例图: 源代码:https://github.com/Smartisa/beijingparse DEMO 阅读全文
posted @ 2020-01-31 21:28 博二爷 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 xAxis: [ 2 { 3 type: 'category', 4 data:[], 5 axisLabel: { 6 interval: 0, 7 formatter:function(value) 8 { 9 debugger 10 var ret = "";//拼接加\n返回的类 阅读全文
posted @ 2020-01-31 18:34 博二爷 阅读(901) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 xAxis: [ 2 { 3 type: 'category', 4 data:[], 5 axisLabel: { 6 interval:0, 7 rotate:40 8 }, 9 grid: { 10 left: '10%', 11 bottom:'35%' 12 } 13 14 } 阅读全文
posted @ 2020-01-31 18:32 博二爷 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 代码: 1 dataZoom : [ 2 3 { 4 5 type: 'slider', 6 7 show: true, 8 9 start: 94, 10 11 end: 100, 12 13 handleSize: 8 14 15 }, 16 17 { 18 19 type: 'inside', 阅读全文
posted @ 2020-01-31 18:29 博二爷 阅读(4625) 评论(0) 推荐(0) 编辑
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 53 下一页