随笔分类 -  爬虫相关

摘要:Document 你的cookie: 某篇微博id: 功能: 操作多少次: GOGOGO ... 阅读全文
posted @ 2018-08-31 20:47 cl94 阅读(169) 评论(0) 推荐(0)
摘要:<?php header("Content-Type:text/html;charset=utf-8"); date_default_timezone_set("PRC"); //时区 ignore_user_abort(); //关掉浏览器,PHP脚本也可以继续执行. set_time_limit(0); // 通过set_time_limit(0)可以让程序无限制的执行下去 //得到数组... 阅读全文
posted @ 2018-08-30 20:29 cl94 阅读(524) 评论(0) 推荐(0)
摘要:写入日志 爬虫curl //一行行读取文件 阅读全文
posted @ 2018-08-30 17:23 cl94 阅读(127) 评论(0) 推荐(0)
摘要:轻松签到 输入贴吧的COOKIE: 一键签到 Cookie错误,程序停止!'; ob_flush(); flush(); }else{ echo '登陆成功!u like:'.count($tiebaData).'。签到开始!';... 阅读全文
posted @ 2018-08-08 11:09 cl94 阅读(306) 评论(0) 推荐(0)
摘要:关于curl的优秀文章 php curl cookie 存取示例(标准采集程序)及伪装 https://blog.csdn.net/e421083458/article/details/19326893 PHP cURL应用实现模拟登录与采集使用方法详解 http://www.cnblogs.com 阅读全文
posted @ 2018-08-06 18:36 cl94 阅读(1046) 评论(0) 推荐(0)
摘要:定界符号 : 多种都可以,常用为// 原子 : 最小的一个匹配单位 (放在定界符中),在一个正则表达式中,至少要有一个原子 1,打印字符(a-z A-Z 0-9 ~!@#$%^&*()_+...)和非打印字符 2, 代表一类字符 \d :任意一个数字 [0-9] \D :任意一个非数字 [^0-9] 阅读全文
posted @ 2018-07-27 18:02 cl94 阅读(776) 评论(0) 推荐(0)
摘要:%s 0 "); //XML的发送图片模板 define("IMAGETPL", " ... 阅读全文
posted @ 2018-07-09 17:14 cl94 阅读(1267) 评论(0) 推荐(0)
摘要://php返回json echo json_encode($data); //php将返回的json转换成数组 json_decode($data,true); 阅读全文
posted @ 2018-07-08 22:49 cl94 阅读(337) 评论(0) 推荐(0)
摘要:curl($url); //获取子新闻们的url $urls = $this->geturls($curl); $news = []; $num = 0; //获取子链接每个新闻的标题、正文、url foreach($urls as $value){ $new_curl = $this->curl($value); ... 阅读全文
posted @ 2018-05-13 15:44 cl94 阅读(136) 评论(0) 推荐(0)
摘要:'; $myfile = fopen('D:\歌词.txt.txt','r'); echo '1'; $info = []; $num = 0; $number = 0; while($line = fgets($myfile)){ //获取用户名 ... 阅读全文
posted @ 2018-05-10 17:28 cl94 阅读(233) 评论(0) 推荐(0)
摘要:字符串与爬虫相关 1,解析url 阅读全文
posted @ 2018-05-10 17:23 cl94 阅读(186) 评论(0) 推荐(0)
摘要:1,获取字串:substr($str,$start,$length) mb_substr($str,$start,$length,'utf-8'); 更换为utf8编码,能准确的截取中文 2,替换字符串:substr_replace() 3,substr_count():查询字串出现的频率(次数) 阅读全文
posted @ 2018-05-09 13:41 cl94 阅读(235) 评论(0) 推荐(0)