上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要: XPath XPath,全称 XML Path Language,即 XML 路径语言,它是一门在 XML 文档中查找信息的语言。最初是用来搜寻 XML 文档的,但同样适用于 HTML 文档的搜索。所以在做爬虫时完全可以使用 XPath 做相应的信息抽取。 1. XPath 概览 XPath 的选择 阅读全文
posted @ 2020-07-28 12:11 酷酷的城池 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 期间会解压不了 tar 文件 是虚拟的光驱所以需要复制到本地再解压 https://blog.csdn.net/engerla/article/details/83009677 阅读全文
posted @ 2020-07-10 11:24 酷酷的城池 阅读(112) 评论(0) 推荐(0) 编辑
摘要: <?php class Idcreate { const EPOCH = 0; //开始时间,固定一个小于当前时间的毫秒数 const max12bit = 1024; const max41bit = 1099511627888; static $machineId = null; public 阅读全文
posted @ 2020-07-09 16:12 酷酷的城池 阅读(476) 评论(0) 推荐(0) 编辑
摘要: from subprocess import Popen,PIPE node = 'node test.js {sessionId} "{body}" {action}'.format(sessionId=self.sessionId,body=self.body,action=self.actio 阅读全文
posted @ 2020-07-07 09:27 酷酷的城池 阅读(147) 评论(0) 推荐(0) 编辑
摘要: curl_setopt($curl, CURLOPT_HEADER, 1); $data = curl_exec($curl); $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE); // 根据头大小去获取头信息内容 $header = s 阅读全文
posted @ 2020-06-29 15:22 酷酷的城池 阅读(980) 评论(0) 推荐(0) 编辑
摘要: ini_set("display_errors", "On"); error_reporting(E_ALL & ~E_NOTICE); 阅读全文
posted @ 2020-06-29 13:44 酷酷的城池 阅读(295) 评论(0) 推荐(0) 编辑
摘要: entos7.1安装squid高匿代理ip服务 参考链接:使用CentOS7配置Squid代理 - heiby的博客 - CSDN博客 爬虫需要变换ip突破封锁,adsl拨号vps有大量的有用的ip,用作爬虫代理效果甚佳。 取一台拨号vps,安装squid yum install -y epel-r 阅读全文
posted @ 2020-06-24 10:54 酷酷的城池 阅读(260) 评论(0) 推荐(0) 编辑
摘要: <?php /** * redis操作类 * 说明,任何为false的串,存在redis中都是空串。 * 只有在key不存在时,才会返回false。 * 这点可用于防止缓存穿透 * */ // 引入文件 class _Redis { private $redis; //当前数据库ID号 protec 阅读全文
posted @ 2020-06-19 10:35 酷酷的城池 阅读(162) 评论(0) 推荐(0) 编辑
摘要: https://natapp.cn/ 阅读全文
posted @ 2020-06-16 16:11 酷酷的城池 阅读(166) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/feiyanaffection/article/details/81394745 一、集合大纲 1.集合和数组的区别: 2.Collection集合的方法: 3.常用集合的分类:Collection 接口的接口 对象的集合(单列集合)├——-List 接口 阅读全文
posted @ 2020-06-10 12:20 酷酷的城池 阅读(201) 评论(0) 推荐(0) 编辑
摘要: DELETE from 表明 where id not in( select a.id from ( SELECT id FROM 表明 GROUP BY 字段 )a ) MySQL5.7版本sql_mode=only_full_group_by问题解决办法 SET sql_mode ='STRIC 阅读全文
posted @ 2020-06-04 09:49 酷酷的城池 阅读(196) 评论(0) 推荐(0) 编辑
摘要: <?php namespace jwt; /** * PHP实现jwt */ class Jwt { //头部 private static $header=array( 'alg'=>'HS256', //生成signature的算法 'typ'=>'JWT' //类型 ); //使用HMAC生成 阅读全文
posted @ 2020-05-30 13:13 酷酷的城池 阅读(207) 评论(0) 推荐(0) 编辑
摘要: html { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter:progid:DXImageTr 阅读全文
posted @ 2020-05-26 14:00 酷酷的城池 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bash current=`date "+%Y%m%d%H%M%S"` source 引入配置文件/config1.sh key=`echo -n $current$hash_key|md5sum|cut -d" " -f1` status="`ps -ef |grep "curl 配 阅读全文
posted @ 2020-05-26 11:09 酷酷的城池 阅读(1958) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python3 import sys import imp import jieba import jieba.posseg as psg import urllib.parse ################################################# 阅读全文
posted @ 2020-05-25 09:02 酷酷的城池 阅读(579) 评论(0) 推荐(0) 编辑
摘要: 这三个类的主要区别在两个方面:运算速度(运算性能或执行效率)和线程安全性。 1、运算速度比较(通常情况下):StringBuilder > StringBuffer > String String是final类不能被继承且为字符串常量,而StringBuilder和StringBuffer均为字符串 阅读全文
posted @ 2020-05-16 14:41 酷酷的城池 阅读(141) 评论(0) 推荐(0) 编辑
摘要: <?php function curl_get($url,$header=[]){ if(!$header){ $header = array( 'Accept: application/json', ); } $curl = curl_init(); //设置抓取的url curl_setopt( 阅读全文
posted @ 2020-05-12 13:59 酷酷的城池 阅读(184) 评论(0) 推荐(0) 编辑
摘要: #ik_max_word搜索用ik_smart$ curl -X PUT 'localhost:9200/accounts' -d ' { "mappings": { "properties": { "user": { "type": "text", "analyzer": "ik_max_word 阅读全文
posted @ 2020-05-07 18:02 酷酷的城池 阅读(1125) 评论(0) 推荐(0) 编辑
摘要: 搞学习猿学:http://yuanxue365.com/简书:https://www.jianshu.com/doyoudo:http://www.doyoudo.com/好知网:http://www.howzhi.com/找书籍ePuBw(优质电子书下载网站):https://epubw.com/ 阅读全文
posted @ 2020-05-06 14:44 酷酷的城池 阅读(636) 评论(0) 推荐(0) 编辑
摘要: <?php #生产 $rk = new RdKafka\Producer(); $rk->setLogLevel(LOG_DEBUG); $rk->addBrokers("127.0.0.1"); $topic = $rk->newTopic("test3"); for ($i = 0; $i < 阅读全文
posted @ 2020-05-06 14:28 酷酷的城池 阅读(809) 评论(0) 推荐(0) 编辑
摘要: linux(centos 7)下安装elasticsearch - head插件(端口占用,防火墙关闭) 一:安装Git(如果未安装)## 1, yum install git 2, git --version #查看版本 二:安装node(如果未安装)## node安装 三:安装grunt(如果未 阅读全文
posted @ 2020-04-30 15:28 酷酷的城池 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1.下载kibana安装包 wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.5-linux-x86_64.tar.gz #修改成自己的版本 sha1sum kibana-5.6.5-linux-x86_64.tar.gz t 阅读全文
posted @ 2020-04-30 09:52 酷酷的城池 阅读(1390) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bashpath="/disk2/es" case "$1" instart) su cheng<<! cd $path ./bin/elasticsearch -d! echo "elasticsearch startup" ;;stop) es_pid=`ps aux|grep e 阅读全文
posted @ 2020-04-29 18:25 酷酷的城池 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 虚拟机使用net连接模式1Download and unzip the latest Elasticsearch distribution 2Run bin/elasticsearch on Unix or bin\elasticsearch.bat on Windows 3Run curl -X 阅读全文
posted @ 2020-04-29 14:15 酷酷的城池 阅读(578) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/apple_llb/article/details/50444280 #!/bin/bash REDISPORT=8530 EXEC=/usr/local/redis/redis-4.0.9/src/redis-server CLIEXEC=/usr/lo 阅读全文
posted @ 2020-04-29 10:51 酷酷的城池 阅读(1041) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页