用php轻松爬微信文章,附完整代码

linbojue
• 阅读 353

微信公众号成为了现代人获取资讯的主要途径之一,然而每天需要手动打开公众号查看最新文章,不仅费时费力,而且易错漏。那么有没有一种方法可以自动化地获取微信文章呢?答案是有的,只需要使用php编写爬虫程序即可。本文将详细介绍如何使用php爬取微信文章,并提供完整的代码实现。

一、了解微信公众平台

在开始编写爬虫程序前,我们需要先了解微信公众平台的基本结构和API接口。微信公众平台是一个基于微信开发的应用平台,包括订阅号、服务号、企业号和小程序等。其中订阅号和服务号是我们在日常生活中最为熟悉的两种类型。为了获取最新的文章信息,我们需要使用到微信公众平台提供的API接口——获取公众号历史文章接口。

二、申请微信公众平台开发者账号

在使用微信公众平台API接口前,我们需要先申请开发者账号,并创建一个测试账号。具体操作步骤可以参考官方文档:

三、获取access_token

在使用微信公众平台API接口前,我们需要先获取access_token,该token是访问API接口的唯一凭证。获取access_token的方法有多种,这里我们介绍一个简单的方法——使用curl发送GET请求获取。

代码实现如下:

9328af9636bb3add707425d0a89494f5

四、获取公众号历史文章列表

使用微信公众平台提供的“获取公众号历史文章接口”,我们可以轻松地获取到公众号的历史文章列表。该接口返回的数据格式为JSON,包含了文章的标题、链接、封面图等信息。

代码实现如下:

9328af9636bb3add707425d0a89494f5'news', 'offset'=>0, 'count'=>$count, 'tag_id'=>$wechat_id,);$data =6b75574d3f962e34b1fac1addebc32f4_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS,$data);$output = curl_exec($ch);curl_close($ch);$jsoninfo =6b75574d3f962e34b1fac1addebc32f4_decode($output, true);//解析JSON数据foreach ($jsoninfo['item'] as $item){ foreach ($item['content']['news_item'] as $news_item){ echo '标题:'.$news_item['title'].'
'; echo '链接:'.$news_item['url'].'
'; echo '封面图:'.$news_item['thumb_url'].'

'; }}?> 五、获取微信文章内容

获取到文章列表后,我们还需要进一步获取每篇文章的详细内容。使用微信公众平台提供的“获取公众号文章接口”,我们可以轻松地获取到文章的正文内容。该接口返回的数据格式为HTML,包含了文章的标题、作者、正文内容等信息。

代码实现如下:

9328af9636bb3add707425d0a89494f5'your_media_id',);$data =6b75574d3f962e34b1fac1addebc32f4_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS,$data);$output = curl_exec($ch);curl_close($ch);//解析HTML数据$doc = new DOMDocument();$doc->loadHTML($output);$title =$doc->getElementsByTagName('title')->item(0)->nodeValue;$author =$doc->getElementsByTagName('author')->item(0)->nodeValue;$content =$doc->getElementsByTagName('content')->item(0)->nodeValue;echo '标题:'.$title .'
';echo '作者:'.$author .'
';echo '正文内容:'.$content .'
';?> 六、使用代理IP提高爬虫效率

https://www.720yun.com/vr/03ejzskf5k2 https://www.720yun.com/vr/1edjzskf5m8 https://www.720yun.com/vr/467jzskf5n2

在爬虫程序运行过程中,我们可能会遇到被封IP的情况。为了规避这种情况,我们可以使用代理IP来提高爬虫效率和稳定性。

代码实现如下:

9328af9636bb3add707425d0a89494f5 七、使用多线程提高爬虫效率

在处理大量数据时,单线程的爬虫程序可能会因为速度过慢而无法满足需求。为了提高爬虫效率,我们可以使用多线程技术来加速爬虫程序。

代码实现如下:

9328af9636bb3add707425d0a89494f5 八、使用正则表达式解析HTML数据

在解析HTML数据时,我们可以使用正则表达式来提取我们所需要的内容。以下是一些常用的正则表达式:

提取标题:

phppreg_match('/(.*)</title>/',$html,$matches);$title =$matches[1]; 提取作者:</p> <p>phppreg_match('/<span class="rich_media_meta rich_media_meta_text">(.*?)</span>/',$html,$matches);$author = trim(strip_tags($matches[1])); 提取正文内容:</p> <p>phppreg_match_all('/<p>(.*?)</p>/',$html,$matches);$content = implode('',$matches[1]); 九、总结</p> <p>通过本文的介绍,我们了解了如何使用php编写爬虫程序来获取微信文章信息。具体而言,我们需要先申请微信公众平台开发者账号,并创建一个测试账号。然后,我们需要获取access_token,使用该token来调用微信公众平台提供的API接口,获取文章列表和文章内容。在实际应用中,我们还可以使用代理IP和多线程技术来提高爬虫效率和稳定性。</p></div> </article> <div class="tags-box" data-v-1bdff09d><a href="/tag/PHP.html" target="_blank" class="item" data-v-1bdff09d>PHP</a></div> <div class="blog-btns-box" data-v-7d5edd21><div class="btn-item" data-v-7d5edd21><div class="circle zan" data-v-7d5edd21><IconFont type="icon-Dianzan" class="iconfont" data-v-7d5edd21></IconFont></div> <div class="text" data-v-7d5edd21>点赞</div></div> <div class="btn-item" data-v-7d5edd21><div class="circle favorite" data-v-7d5edd21><IconFont type="icon-Like1" class="iconfont" data-v-7d5edd21></IconFont></div> <div class="text" data-v-7d5edd21>收藏</div></div></div></div> <div id="recommend-lesson"><div class="recommend-lesson-title">推荐课程</div> <div class="horizontal" data-v-ba84c88a><a target="_blank" href="/lesson/detail/1935098869" class="re-course-list" data-v-ba84c88a><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/b198ef1a1d11a9c6e81531134cc3327a.png" alt="avatar" data-v-ba84c88a> <div class="re-info" data-v-ba84c88a><h2 data-v-ba84c88a>Java synchronized同步关键字背后的原理与源码实现 </h2> <div class="des" data-v-ba84c88a><div style="display: flex; align-items: center" data-v-ba84c88a><div class="price-icon" data-v-ba84c88a>¥</div> <div class="price" data-v-ba84c88a> 109.00 </div></div> <span data-v-ba84c88a>56人学习</span></div></div></a><a target="_blank" href="/lesson/detail/7011629094" class="re-course-list" data-v-ba84c88a><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/80fd22993d90e1283227f808922efd96.png" alt="avatar" data-v-ba84c88a> <div class="re-info" data-v-ba84c88a><h2 data-v-ba84c88a>Andriod设计模式实战</h2> <div class="des" data-v-ba84c88a><div class="price" data-v-ba84c88a>免费</div> <span data-v-ba84c88a>37人学习</span></div></div></a></div></div> <div id="anchor" class="comment-container"><div id="comment-panel" class="comment-panel" data-v-25426b80><div class="panel-title" data-v-25426b80>评论区</div> <div class="comment-input-box" data-v-25426b80><img src="/_nuxt/img/default-avatar.38df358.png" alt class="user-avatar" data-v-25426b80> <!----></div> <!----></div></div> <div class="recommend-blog-list"><div class="recommend-title">推荐文章</div> <div class="art-list" data-v-6293c55f><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/412212ed61b168f93f528f66067b7774.jfif" alt="无聊的调包专家" class="img" data-v-6293c55f> <a href="/boring_coder" target="_blank" class="name" data-v-6293c55f> 无聊的调包专家 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/9789260596" target="_blank" title="微标题信公众号文章,阅读数,点赞数历史文章抓取" class="title single-ellipsis" data-v-6293c55f> 微标题信公众号文章,阅读数,点赞数历史文章抓取 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 微标题信公众号文章,阅读数,点赞数历史文章抓取需求最近在做舆情与微信文章相关的数据抓取,发现微信公众号有些难点很难克服。市面上流行的数据抓取思路要么被腾讯封杀,要么操作难度大。解决方案搜狗微信无法采集历史,而且搜索也不按时间排序。获取的数据的价值不高,仅仅可以通过他获取公众号的biz。微信公众平台微信公 </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>1920</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/029f3db4e28f2d8b1b0e861c3ba11a97.png" alt="DevOpSec" class="img" data-v-6293c55f> <a href="/k8s" target="_blank" class="name" data-v-6293c55f> DevOpSec </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/7946785238" target="_blank" title="如何将Markdown文章轻松地搬运到微信公众号并完美地呈现代码内容" class="title single-ellipsis" data-v-6293c55f> 如何将Markdown文章轻松地搬运到微信公众号并完美地呈现代码内容 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 相信有很多童鞋跟我一样,热衷于用Markdown来编写文章。由于其简单的语法和清晰的渲染效果,受到广大码农朋友们的推崇。但是,当我们想维护起自己的公众号时,公众号编辑器往往让我们费劲了脑汁。本人尝试了各种工具,比如:秀米一些在线提供多种不同样式的编辑器。虽然这些编辑器都能够完成编辑任务,但是效果并不理想。与我们所追求的简洁、清晰风格总是格格不入,尤其是对于代 </div></div> <img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/abf674b71c937ef772244d52d7fa511e.png" class="item-right" data-v-6293c55f></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>1764</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/af6c39b7943316730c36434571bd04cd.jpg" alt="MaxSky" class="img" data-v-6293c55f> <a href="/MaxSky" target="_blank" class="name" data-v-6293c55f> MaxSky </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/5763697557" target="_blank" title="PHP 微信公众号消息加解密" class="title single-ellipsis" data-v-6293c55f> PHP 微信公众号消息加解密 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 公众号配置根据提示设置即可:【图中信息均为无意义数据,仅供参考。注意服务器地址需可接收GET/POST两种请求】AESKey直接点一下随机生成即可,Token可以生成一个UUID再把UUID进行MD5一次即可。接收关注事件消息示例请求参数校验这一步根据项目情况,可供参考:(Lumen框架)php$valida </div></div> <img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/2c84ea5ec497c071679aa03f9808b5a7.png" class="item-right" data-v-6293c55f></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>1781</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/46847d754406b0102dee7a1f54d14f92.jfif" alt="Wesley13" class="img" data-v-6293c55f> <a href="/Wesley13" target="_blank" class="name" data-v-6293c55f> Wesley13 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/5520528602" target="_blank" title="PHP微信小程序支付——签名错误 " class="title single-ellipsis" data-v-6293c55f> PHP微信小程序支付——签名错误 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> !(https://static.oschina.net/uploads/space/2018/0509/141657_Tqix_3477605.png)先分清几个概念:微信公众平台、微信开放平台、微信商户平台1.微信公众平台、微信开放平台、微信商户平台是三个不同的平台2.微信公众平台:用于公众号、小程序等等的设置平台,包括APPID、APP </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>1344</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/1bad3e5246214111b0d7a482fc5beec5.jfif" alt="Stella981" class="img" data-v-6293c55f> <a href="/Stella981" target="_blank" class="name" data-v-6293c55f> Stella981 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/9724810047" target="_blank" title="Markdown 简明语法 " class="title single-ellipsis" data-v-6293c55f> Markdown 简明语法 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 关注我,每天都有优质技术文章推送,工作,学习累了的时候放松一下自己。本篇文章同步微信公众号欢迎大家关注我的微信公众号:「醉翁猫咪」!(https://oscimg.oschina.net/oscnet/up1d5ae683f66a54eb857ab1a178a657b6.jpg)今天我们了解一下什么是Markdow </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>904</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/46847d754406b0102dee7a1f54d14f92.jfif" alt="Wesley13" class="img" data-v-6293c55f> <a href="/Wesley13" target="_blank" class="name" data-v-6293c55f> Wesley13 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/6194105321" target="_blank" title="Java 8 创建 Stream 的 10 种方式,我保证你受益无穷! " class="title single-ellipsis" data-v-6293c55f> Java 8 创建 Stream 的 10 种方式,我保证你受益无穷! </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 之前栈长分享过Java8一系列新特性的文章,其中重点介绍了Stream.!(http://img.javastack.cn/20190613135450.png)!(http://img.javastack.cn/20190613135537.png)获取上面这份Java8~12系列新特性干货文章,请在微信搜索关注微信公众号: </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>740</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/1bad3e5246214111b0d7a482fc5beec5.jfif" alt="Stella981" class="img" data-v-6293c55f> <a href="/Stella981" target="_blank" class="name" data-v-6293c55f> Stella981 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/5421177182" target="_blank" title="Blob分析" class="title single-ellipsis" data-v-6293c55f> Blob分析 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 文章转自微信公众号:机器视觉那些事\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\公众号:机器视觉那些事儿\\\\\\ </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>737</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/46847d754406b0102dee7a1f54d14f92.jfif" alt="Wesley13" class="img" data-v-6293c55f> <a href="/Wesley13" target="_blank" class="name" data-v-6293c55f> Wesley13 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/6235848117" target="_blank" title="10分钟上线 " class="title single-ellipsis" data-v-6293c55f> 10分钟上线 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> _摘要:_ 阿里云函数计算是一个事件驱动的全托管计算服务。通过函数计算,您无需管理服务器等基础设施,只需编写代码并上传。微信小程序是一种不需要下载安装即可使用的应用,它可以在微信内被便捷地获取和传播。当微信小程序遇见serverless,他们会产生奇妙火花,利用函数计算可以快速搭建微信小程序的serverle.点此查看原文:http://clic </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>675</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/46847d754406b0102dee7a1f54d14f92.jfif" alt="Wesley13" class="img" data-v-6293c55f> <a href="/Wesley13" target="_blank" class="name" data-v-6293c55f> Wesley13 </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 3年前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/4174793208" target="_blank" title="C# 软件开机启动 " class="title single-ellipsis" data-v-6293c55f> C# 软件开机启动 </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 如果需要查看更多文章,请微信搜索公众号csharp编程大全,需要进C交流群群请加微信z438679770,备注进群,我邀请你进群!!!usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentMod </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>672</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div><div class="blog-item" data-v-6293c55f><div class="blog-header" data-v-6293c55f><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/149224f1f9d816d2f9fead5fe1db454b.jpg" alt="linbojue" class="img" data-v-6293c55f> <a href="/2439386182" target="_blank" class="name" data-v-6293c55f> linbojue </a> <div class="dot" data-v-6293c55f>•</div> <div class="time" data-v-6293c55f> 8个月前 </div></div> <div class="blog-content" data-v-6293c55f><div class="item-left" data-v-6293c55f><a href="/p/0007112332" target="_blank" title="用PHP获取微信公众号文章,轻松实现!" class="title single-ellipsis" data-v-6293c55f> 用PHP获取微信公众号文章,轻松实现! </a> <div class="intro multi-ellipsis-2" data-v-6293c55f> 微信公众号已经成为了很多人获取信息的重要途径,而在开发中,有时候需要通过代码来获取公众号文章。PHP作为一种广泛应用的Web编程语言,也可以实现这一功能。本文将详细介绍PHP如何获取微信公众号文章。一、准备工作在开始之前,我们需要先准备好以下两个东西:一个 </div></div> <!----></div> <!----> <div class="blog-footer flex" data-v-6293c55f><div class="iconfont footer-item icon-Show1" data-v-6293c55f><span class="num" data-v-6293c55f>588</span></div><div class="iconfont footer-item icon-Guanbi1-copy" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div><div class="iconfont footer-item icon-Pinglun1" data-v-6293c55f><span class="num" data-v-6293c55f>0</span></div></div></div> </div></div></div> <div class="blog-right-container"><div class="personal-info" data-v-af95cca0><div class="base-info" data-v-af95cca0><img src="https://img-hello-world.oss-cn-beijing.aliyuncs.com/imgs/149224f1f9d816d2f9fead5fe1db454b.jpg" alt="linbojue" class="avatar" data-v-af95cca0> <div class="info-content" data-v-af95cca0><div onc class="name-level" data-v-af95cca0><div class="name single-ellipsis" data-v-af95cca0> linbojue </div> <div class="level-icon level-1" data-v-429e45df data-v-af95cca0> Lv1 </div></div> <!----></div></div> <button type="button" class="follow-btn ant-btn ant-btn-primary ant-btn-background-ghost" data-v-af95cca0><span>关 注</span></button> <div class="signature" data-v-af95cca0>一分钱难倒英雄汉!</div> <div class="article-fans-stars" data-v-af95cca0><div class="item" data-v-af95cca0><div class="label" data-v-af95cca0>文章</div> <div class="value" data-v-af95cca0> 47 </div></div><div class="item" data-v-af95cca0><div class="label" data-v-af95cca0>粉丝</div> <div class="value" data-v-af95cca0> 1 </div></div><div class="item" data-v-af95cca0><div class="label" data-v-af95cca0>获赞</div> <div class="value" data-v-af95cca0> 0 </div></div></div> <div class="author-social-info" data-v-af95cca0><!----> <!----> <!----></div></div> <div class="sider-box" data-v-377f20d6><h5 class="common-title" data-v-377f20d6>热门文章</h5> <div class="content-box" data-v-377f20d6><div class="hot-article-list" data-v-5fa70b3e><div class="item" data-v-5fa70b3e><a href="/p/8150596603" title="北京房屋租赁开发票!怎么开具!" class="abstract multi-ellipsis-2" data-v-5fa70b3e> 北京房屋租赁开发票!怎么开具! </a></div><div class="item" data-v-5fa70b3e><a href="/p/0312229293" title="重庆开劳务费发票!步骤!" class="abstract multi-ellipsis-2" data-v-5fa70b3e> 重庆开劳务费发票!步骤! </a></div><div class="item" data-v-5fa70b3e><a href="/p/7924686689" title="利用IEC 62443标准提升基础设施网络安全" class="abstract multi-ellipsis-2" data-v-5fa70b3e> 利用IEC 62443标准提升基础设施网络安全 </a></div><div class="item" data-v-5fa70b3e><a href="/p/2327153517" title="骆云:营造好房子,做产品主义的践行者" class="abstract multi-ellipsis-2" data-v-5fa70b3e> 骆云:营造好房子,做产品主义的践行者 </a></div><div class="item" data-v-5fa70b3e><a href="/p/1124968194" title="苹果可能在国内设备使用百度AI技术:集成于iOS 18" class="abstract multi-ellipsis-2" data-v-5fa70b3e> 苹果可能在国内设备使用百度AI技术:集成于iOS 18 </a></div></div></div></div></div></div></div> <!----></div></div></div><script>window.__NUXT__=(function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A){return {layout:"default",data:[{}],fetch:{},error:f,state:{showSlideAuth:c,showLogin:c,fromIndex:c,urlConfig:{GET_BLOG_COLLECTION_LIST_URL:j,getAllTag:"\u002Ftag\u002FgetAllTag",CREATE_BLOG_URL:"\u002Fmanage\u002FcreateBlog",PUBLISH_BLOG_URL:"\u002Fmanage\u002FpublishBlog",UPDATE_BLOG_DETAIL:"\u002Fmanage\u002FupdateBlog",GET_BLOG_DETAIL:"\u002Fblog\u002FgetBlogDetail",GET_BLOG_NEWEST_DRAFT:k,UPDATE_CHAPTER_URL:l,GET_CHAPTER_NEWEST_DRAFT:m,PUBLISH_CHAPTER:l,CREATE_BLOG_CATE:"\u002Fcollection\u002Fadd",RENAME_COLLECTION:"\u002Fcollection\u002FrenameCollection",DELETE_COLLECTION:"\u002Fcollection\u002FdeleteCollection",GET_MY_BLOG_LIST_URL:"\u002Fadmin\u002FblogList",FOLLOW_AUTHOR:"\u002Fuser\u002Ffollow",UNFOLLOW_AUTHOR:"\u002Fuser\u002Funfollow",GET_RECOMMEND_BLOG:"\u002Fhome\u002FgetHomeBlogByAction",GET_RECOMMEND_BLOG_BY_CATE:"\u002Fhome\u002FgetHomeBlogListByTag",GET_RECOMMEND_BLOG_BY_TAG:"\u002Fhome\u002FgetBlogListByTag",GET_TAG_LIST:"\u002Fuser\u002FhotWords",GET_CATE_LIST:"\u002Ftag\u002FgetHomeTag",GET_RECOMMEND_AUTHOR:"\u002Fhome\u002FgetRecommendAuthorList",GET_DAILY_ALGORITHM:"\u002Fhome\u002Fdailyalgorithm",LOG_IN:"\u002Faccess\u002Flogin",LOG_OUT:"\u002Faccess\u002FsignOut",CHECK_USER_INFO:"\u002Faccess\u002FcheckUserInfo",REGISTER:"\u002Faccess\u002Fregister",CHANGE_PWD:"\u002Faccess\u002FchangePassword",SEND_CODE:"\u002Faccess\u002FsendCode",ACTION_AUTH:"\u002Faccess\u002FactionAuth",ACTION_AUTH2:"\u002Faccess\u002FactionAuth2",CHECK_USER_AND_BLOG:"\u002Faccess\u002FcheckUserAndBlog",CHECK_TOKEN:"\u002Faccess\u002FcheckToken",SIGN_IN:"\u002Faccess\u002FsignIn",GET_PERSONAL_INFO:"\u002Fuser\u002Fdetail\u002Finfo",GET_PERSONAL_BLOG_LIST:"\u002Fuser\u002Fdetail\u002Fbloglist",FILE_UPLOAD:"\u002Ffile\u002Fupload",DL_AND_UPLOAD:"\u002Ffile\u002FdownloadAndUploadOss",GET_MY_FOLLOW_USER_LIST:"\u002Fadmin\u002FgetMyFollowUserList",GET_MY_FANS_USER_LIST:"\u002Fadmin\u002FgetMyFansUserList",GET_MY_FOLLOW_QUESTION_LIST:"\u002Fadmin\u002FgetMyFollowQuestion",GET_MY_SUBSCIBE_SPECIAL_LIST:"\u002Fadmin\u002FgetMySubscribeSpecialList",TAKE_OFF_BLOG:"\u002Fadmin\u002FtakeOffBlog",TAKE_ON_BLOG:"\u002Fadmin\u002FtakeOnBlog",GET_HOME_RECOMMEND_SPECIAL_LIST:"\u002Fhome\u002FgetRecommendSpecialList",GET_MOST_SPECIAL_COUNT_USER_LIST:"\u002Fspecial\u002FgetSpecialMostUserList",GET_SPECIAL_CATE_LIST_URL:"\u002Fspecial\u002FgetSpecialCateList",GET_SPECIAL_LIST_URL:"\u002Fspecial\u002FgetSpecialList",GET_SPECIAL_LIST_PER_CATEGORY_URL:"\u002Fspecial\u002FgetSpecialListPerCategory",GET_CATEGORY_INFO_BY_ID_URL:"\u002Fhome\u002FgetCategoryInfoById",GET_SPECIAL_COUNT_PER_CATEGORY_URL:"\u002Fspecial\u002FgetSpecialTotalCountPerCategory",GET_SPECIAL_BANNER:"\u002Fspecial\u002FgetBannerList",GET_SPECIAL_DETAIL_CHAPTER_LIST:"\u002Fspecial\u002FgetSpecialSectionList",GET_SPECIAL_DETAIL:"\u002Fspecial\u002FgetMySpecialChapterInfo",GetChapterInfo:"\u002Fspecial\u002FgetSectionDetail",GET_SPECIAL_DETAIL_INFO:"\u002Fadmin\u002FgetSpecialDetail",ADD_CHAPTER_URL:"\u002Fadmin\u002FaddChapter",UPDATE_CHAPTER_INFO:"\u002Fadmin\u002FupdateChapterInfo",UPDATE_CHAPTER_SEQUENCE:"\u002Fadmin\u002FupdateChapterSequence",DELETE_CHAPTER_URL:"\u002Fadmin\u002FdeleteChapter",TAKE_ON_SPECIAL:"\u002Fspecial\u002FpublishSection",TAKE_OFF_SPECIAL:"\u002Fadmin\u002FtakeOffSpecial",RENAME_SPECIAL:"\u002Fadmin\u002FrenameSpecial",GET_SPECIAL_CATE_LIST:"\u002Fadmin\u002FgetSpecialCateList",UPDATE_SPECIAL_INTRO:"\u002Fadmin\u002FupdateSpecialIntro",UPDATE_SPECIAL_INFO:"\u002Fadmin\u002FupdateSpecialCateId",UPDATE_SPECIAL_TITLE:"\u002Fadmin\u002FupdateSpecialTitle",DELETE_SPECIAL:"\u002Fadmin\u002FdeleteSpecial",GET_CHAPTER_COMMENT:"\u002Fcomment\u002FgetChapterCommentList",UPDATE_SPECIALINFO:"\u002Fadmin\u002FupdateSpecialBaseInfo",SUBSCRIBE_SPECIAL:n,UN_SUBSCRIBE_SPECIAL:o,MODIFY_SPECIAL:p,GET_TUTORIAL_BIG_CATEGORY:"\u002Ftutorial\u002FgetTutorialBigCategories",GET_ALL_TUTORIALS:q,GET_CHAPTER_AND_SECTION_BY_PATH:"\u002Ftutorial\u002FgetChapterAndSectionByPath",GET_CONTENT_BY_SECTION_PATH:"\u002Ftutorial\u002FgetSectionContent",GET_TUTORIAL_OVERVIEW:r,GET_UID_BY_PROFILE_PATH:"\u002Fuser\u002FgetUidByProfilePath",GET_USER_DETAIL_USER_INFO:"\u002Fuser\u002Fdetail\u002FuserInfo",GET_SPECIAL_CATEGORY:"\u002Fuser\u002Fdetail\u002FspecialCategory",CREATE_SPECIAL_URL:"\u002Fspecial\u002FcreateSpecial",GET_MY_SPECIAL_LIST_URL:"\u002Fadmin\u002FgetMySpecialList",GET_CHAPTER_LIST_PER_SPECIAL_URL:"\u002Fadmin\u002FgetSpecialChapterList",GET_USER_RELATED_QUESTION_LIST:"\u002Fuser\u002Fdetail\u002FgetUserRelatedQuestionList",Get_BLOG_COLLECT_LIST:"\u002Fuser\u002Fdetail\u002FgetUserBlogCollectList",GET_BLOG_LIST_URL:"\u002Fuc\u002FgetUserBlogList",GET_BLOG_LIST_BY_COLLECT_ID:"\u002Fuser\u002Fdetail\u002FgetCollectBlogList",GET_SPECIAL_LIST_BY_SORT_TYPE:"\u002Fuc\u002FgetUserPublishedSpecialList",GET_USER_BASE_INFO:"\u002Fuc\u002FgetUserInfo",GET_NEWEST_BLOG_LIST:"\u002Fuser\u002Fdetail\u002FgetNewestBlogList",GET_NEWEST_COMMENT_LIST:"\u002Fuser\u002Fdetail\u002FgetNewestCommentList",GET_FAVORITE_BLOG_LIST:"\u002Fuc\u002FgetUserFavoriteBlogList",GET_FOLLOW_USER_LIST:"\u002Fuc\u002FgetFollowList",GET_FOLLOW_USER_FANS:"\u002Fuc\u002FgetFanList",GET_HOT_COMMENTS:"\u002Fuc\u002FgetHotComments",IS_USER_BLOG:"\u002Fuc\u002FisUserBlog",GET_SEARCH_WORD:"\u002Fsearch\u002FsearchWord",GET_QUESTION_COMMON_TAG:"\u002Fquestion\u002FgetHotTagList",GET_QUESTION_LIST:"\u002Fquestion\u002FgetQuestionList",GET_QUESTION_DETAIL:"\u002Fquestion\u002FgetQuestionDetail",UPDATE_QUESTION_INFO:"\u002Fquestion\u002FupdateQuestion",GET_QUESTION_BASE_INFO:"\u002Fquestion\u002FgetQuestionBaseInfo",GET_BLOG_COMMENT_LIST:"\u002Fcomment\u002FgetBlogCommentList",ADD_COMMENT:"\u002Fcomment\u002FaddComment",ADD_REPLY:"\u002Fcomment\u002FaddReply",LIKE_BLOG:"\u002Fblog\u002FzanBlog",FAVORITE_BLOG:"\u002Fblog\u002FfavoriteBlog",GET_USER_LIKE_FAVORITE_INFO:"\u002Fadmin\u002FgetUserAndBlogActionInfo",DAMIT_CHANGE_PWD:"\u002Fadmin\u002FchangePassword",UPDATE_PERSONAL:"\u002Fadmin\u002FmodifyPersonalInfo",SUBMIT_SUGGESTION:"\u002Fsuggestion\u002FsubmitSuggestion",GETALLBLOGID:"\u002Faccess\u002FgetAllBlogId",GETCONTENTBYID:"\u002Faccess\u002FgetContentById",UPDATEHTMLBYID:"\u002Faccess\u002FupdateHtmlById",CHANGE_USER_PWD:s,SEND_USER_SMS:"\u002Faccess\u002FsendSmsCode",GET_WIN_USERS:"\u002Fwin\u002FgetWinUsers",GET_FRIEND_LINKS:"\u002Fhome\u002FgetFriendLinks",GET_SITE_MAP:"\u002Fspider\u002FgetSiteMap",GET_BLOG_BY_TAG_NAME:"\u002Fblog\u002FgetBlogByTagName",GET_BLOG_BY_TAG_ID:"\u002Fsearch\u002FsearchTag",GET_RANDOM_TAGS:"\u002Fblog\u002FgetRandomTags",GET_UPLOAD_SIGNATURE:"\u002Fvod\u002FgetUploadSignature",UPLOAD_MEDIA_INFO:"\u002Fvod\u002FuploadMediaInfo",GET_BLOG_INFO:"\u002Fadmin\u002FgetBlogInfo",GET_HOME_RECOMMEND_TAGS:"\u002Ftag\u002FgetHomeRecommendTags",GET_USER_HOT_BLOG_LIST:"\u002Fuc\u002FgetUserHotBlogList",COMMENT_BLOG:"\u002Fcomment\u002Fcomment",GET_COMMENT_LIST:"\u002Fcomment\u002FgetCommentList",REPLY_COMMENT:"\u002Fcomment\u002FreplyComment",GET_COMMENT_REPLIES:"\u002Fcomment\u002FgetCommentReplies",GET_BACK_IMAGE_LIST:"\u002Fuc\u002FgetBackImageList",UPDATE_BACK_IMAGE:"\u002Fuc\u002FupdateBackImage",GET_MY_SPECIAL_LIST:"\u002Fmanage\u002FgetMySpecialList",GET_SUBCRIBED_SPECLIAL_LIST:"\u002Fmanage\u002FgetMySubscribedSpecialList",GET_MY_SPECIAL_DETAIL:"\u002Fmanage\u002FgetMySpecialDetail",SUBCRIBE_SPECLIAL:n,UNSUBCRIBED_SPECLIAL:o,CREATE_COLLECTION:"\u002Fmanage\u002FcreateCollection",GET_COLLECTION_LIST:j,UPDATE_COLLECTION:"\u002Fmanage\u002FupdateCollection",REMOVE_COLLECTION:"\u002Fmanage\u002FremoveCollection",GET_MY_BLOG_LIST:"\u002Fmanage\u002FgetMyBlogList",GET_FOLLOW_LIST:"\u002Fmanage\u002FgetFollowList",UPDATE_FOLLOW:"\u002Fmanage\u002FupdateFollow",GET_MY_INFO:"\u002Fmanage\u002FgetMyInfo",UPDATE_MY_INFO:"\u002Fmanage\u002FupdateMyInfo",GET_MY_FAVORITE_BLOG_LIST:"\u002Fmanage\u002FgetMyFavoriteBlogList",GET_MY_FAVORITE_LESSON_LIST:"\u002Flesson\u002FfavoriteList",UPDATE_FAVORITE_LESSON:"\u002Flesson\u002Ffavorite",UPDATE_CANCEL_FAVORITE_LESSON:"\u002Flesson\u002FremoveFavorite",GET_RECOMMEND_LESSON_BY_BLOG:"\u002Flesson\u002FrecommendLesson",MODIFY_PASSWORD:s,GET_MY_BLOG_DETAIL:k,GET_MY_BLOG_DETAIL_FOR_ADMIN_PREVIEW:"\u002Fmanage\u002FgetMyBlogDetailForAdminPreview",GET_NEW_NOTIFICATION_COUNT:"\u002Fmanage\u002FgetNewNotificationCount",GET_NOTIFICATION_LIST:"\u002Fmanage\u002FgetNotificationList",READ_NOTIFICATION:"\u002Fmanage\u002FreadNotification",CREATE_SECTION:"\u002Fspecial\u002FcreateSection",MODIFIY_SECTION_TITLE:"\u002Fspecial\u002FmodifySectionTitle",MODIFIY_SPECIAL_TITLE:p,MODIFIY_SECTION_STATUS:"\u002Fspecial\u002FmodifySectionStatus",PUBLISH_SPECIAL:"\u002Fspecial\u002FpublishSpecial",OFFLINE_SPECIAL:"\u002Fspecial\u002FofflineSpecial",UNPUBLISHED_SPECIAL_DETAIL:"manage\u002FgetMySpecialDetail",UNPUBLISHED_SPECIAL_CHAPTER_DETAIL:m,UPDATE_BLOG_TITLE:"\u002Fmanage\u002FupdateTitle",UPDATE_BLOG_STATUS_PUBLISHED:"\u002Fmanage\u002FupdateBlogStatusPublished",DELETE_BLOG:"\u002Fmanage\u002FdeleteBlog",GET_CATELIST_TUTORIAL:"\u002Ftutorial\u002FgetCateList",GET_TUTORIAL_LIST:q,GET_TUTORIAL_DETAIL:r,GET_CHAPTER_INFO:"\u002Ftutorial\u002FgetChapterInfo",FAVORITE_SECTION:"\u002Fmanage\u002FfavoriteSection",ZAN_SECTION:"\u002Fmanage\u002FzanSection",LESSON_LIST_ALL:"\u002Flesson\u002Flist\u002Fall",LESSON_LIST_MY:"\u002Flesson\u002Flist\u002Fmy",LESSON_LIST_BUY:"\u002Flesson\u002Flist\u002Fbuy",LESSON_LIST_REC:"\u002Flesson\u002Flist\u002Frec",LESSON_CREATE:"\u002Flesson\u002Fcreate",LESSON_DETAIL_EDIT:"\u002Flesson\u002Fdetail\u002Fedit",LESSON_DETAIL:"\u002Flesson\u002Fdetail",LESSON_DELETE:"\u002Flesson\u002FdeleteLesson",LESSON_CATEGORIES:"\u002Flesson\u002Fcategories",LESSON_DIRECTIONS:"\u002Flesson\u002Fdirections",LESSON_STORE:"\u002Flesson\u002Fstore",LESSON_CREATE_CHAPTER:"\u002Flesson\u002FcreateChapter",LESSON_UPDATE_CHATPER:"\u002Flesson\u002FupdateChapter",LESSON_DELETE_CHAPTER:"\u002Flesson\u002FdeleteChapter",LESSON_CHAPTER_DELETE_VIDEO:"\u002Flesson\u002Fchapter\u002FdeleteVideo",LESSON_CHAPTER_UPDATE_VIDEO:"\u002Flesson\u002Fchapter\u002FupdateVideo",LESSON_CHAPTER_CREATE_VIDEO:"\u002Flesson\u002Fchapter\u002FcreateVideo",LESSON_CHAPTERS:"\u002Flesson\u002Fchapters",LESSON_CHAPTERS_EDIT:"\u002Flesson\u002Fchapters\u002Fedit",LESSON_VIDEO_ENCRYPT:"\u002Flesson\u002Fvideo\u002Fencrypt",LESSON_VIDEO:"\u002Flesson\u002Fvideo",LESSON_VIDEO_M3U8:"\u002Flesson\u002Fvideo\u002Fm3u8",LESSON_COS_TOKEN:"\u002Flesson\u002Fcos\u002Ftoken",LESSON_NOTE:"\u002Flesson\u002Fnote",LESSON_CREATE_SOURCE:"\u002Flesson\u002FcreateResource",LESSON_UPDATE_RESOURCE:"\u002Flesson\u002FupdateResource",LESSON_RESOURCE:"\u002Flesson\u002Fresource",LESSON_DELETE_RESOURCE:"\u002FlessondeleteResource",LESSON_LEARN_REPORT:"\u002Flesson\u002Flearn\u002Freport",ADD_STUDY_COUNT:"\u002Flesson\u002FaddStudyCount",WXPAY_NATIVE_PAY:"\u002Fwxpay\u002FnativePay",WXPAY_QUERY_ORDER_STATUS:"\u002Fwxpay\u002FqueryOrderStatus",WXPAY_ORDER:"\u002Fwxpay\u002Forder",WXPAY_ORDERS:"\u002Fwxpay\u002Forders",WXPAY_CANCELORDER:"\u002Fwxpay\u002FcancelOrder"},isLoading:c,authPhone:b,friendLink:[],showSpecial:c,specialData:f,navFixedVisible:c,deviceId:585917052246408100,blackList:[],access:{token:b,userInfo:{}},admin:{collectionList:[],specialList:[],notifyCount:{},curTab:"blog",blogDetail:{}},backstage:{blogList:{},typeCount:{collectCount:a,commentCount:a,count:a,followCount:a,subscribeCount:a,zanCount:a},isShow:c},course:{isCollapase:t},personal:{errorMsg:b,handling:c,visible:c,success:c,isSmsCoding:c,sendCodeSuccess:c,uid:f,userDetailInfo:{},personalBlogList:[],blogCount:a,personalSpecialList:[],specialCount:a,newestBlog:[],newestComment:[],personalFavoriteList:[],favoriteCount:a,personalFollowList:[],followCount:a,personalFansList:[],fansCount:a,hotComment:[],routeParams:{profile:b,pageType:b}},question:{commonTags:[],questionList:[],questionDetail:{}},recommend:{recommendBlog:{data:[]},tagList:[],categoryList:{data:[]},recommendAuthorList:{data:[]},todayAlgorithm:b,blogDetail:{blogInfo:{uuid:"9398208964",title:"用php轻松爬微信文章,附完整代码",intro:"微信公众号成为了现代人获取资讯的主要途径之一,然而每天需要手动打开公众号查看最新文章,不仅费时费力,而且易错漏。那么有没有一种方法可以自动化地获取微信文章呢?答案是有的,只需要使用php编写爬虫程序即可。本文将详细介绍如何使用php爬取微信文章,并提供完整",content:"微信公众号成为了现代人获取资讯的主要途径之一,然而每天需要手动打开公众号查看最新文章,不仅费时费力,而且易错漏。那么有没有一种方法可以自动化地获取微信文章呢?答案是有的,只需要使用php编写爬虫程序即可。本文将详细介绍如何使用php爬取微信文章,并提供完整的代码实现。\n\n一、了解微信公众平台\n\n在开始编写爬虫程序前,我们需要先了解微信公众平台的基本结构和API接口。微信公众平台是一个基于微信开发的应用平台,包括订阅号、服务号、企业号和小程序等。其中订阅号和服务号是我们在日常生活中最为熟悉的两种类型。为了获取最新的文章信息,我们需要使用到微信公众平台提供的API接口——获取公众号历史文章接口。\n\n二、申请微信公众平台开发者账号\n\n在使用微信公众平台API接口前,我们需要先申请开发者账号,并创建一个测试账号。具体操作步骤可以参考官方文档:\n\n三、获取access_token\n\n在使用微信公众平台API接口前,我们需要先获取access_token,该token是访问API接口的唯一凭证。获取access_token的方法有多种,这里我们介绍一个简单的方法——使用curl发送GET请求获取。\n\n代码实现如下:\n\n9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$appid ='your_appid';$appsecret ='your_appsecret';$url =\";appid={$appid}&secret={$appsecret}\";$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);$output = curl_exec($ch);curl_close($ch);$jsoninfo =6b75574d3f962e34b1fac1addebc32f4_decode($output, true);$access_token =$jsoninfo[\"access_token\"];?\u003E\n\n四、获取公众号历史文章列表\n\n使用微信公众平台提供的“获取公众号历史文章接口”,我们可以轻松地获取到公众号的历史文章列表。该接口返回的数据格式为JSON,包含了文章的标题、链接、封面图等信息。\n\n代码实现如下:\n\n9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$wechat_id ='your_wechat_id';$count = 10;\u002F\u002F返回文章数量$url =\"{$access_token}\";$data = array( 'type'=\u003E'news', 'offset'=\u003E0, 'count'=\u003E$count, 'tag_id'=\u003E$wechat_id,);$data =6b75574d3f962e34b1fac1addebc32f4_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS,$data);$output = curl_exec($ch);curl_close($ch);$jsoninfo =6b75574d3f962e34b1fac1addebc32f4_decode($output, true);\u002F\u002F解析JSON数据foreach ($jsoninfo['item'] as $item){ foreach ($item['content']['news_item'] as $news_item){ echo '标题:'.$news_item['title'].'\u003Cbr\u003E'; echo '链接:'.$news_item['url'].'\u003Cbr\u003E'; echo '封面图:'.$news_item['thumb_url'].'\u003Cbr\u003E\u003Cbr\u003E'; }}?\u003E\n五、获取微信文章内容\n\n获取到文章列表后,我们还需要进一步获取每篇文章的详细内容。使用微信公众平台提供的“获取公众号文章接口”,我们可以轻松地获取到文章的正文内容。该接口返回的数据格式为HTML,包含了文章的标题、作者、正文内容等信息。\n\n代码实现如下:\n\n9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$wechat_id ='your_wechat_id';$url =\"{$access_token}\";$data = array( 'media_id'=\u003E'your_media_id',);$data =6b75574d3f962e34b1fac1addebc32f4_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS,$data);$output = curl_exec($ch);curl_close($ch);\u002F\u002F解析HTML数据$doc = new DOMDocument();$doc-\u003EloadHTML($output);$title =$doc-\u003EgetElementsByTagName('title')-\u003Eitem(0)-\u003EnodeValue;$author =$doc-\u003EgetElementsByTagName('author')-\u003Eitem(0)-\u003EnodeValue;$content =$doc-\u003EgetElementsByTagName('content')-\u003Eitem(0)-\u003EnodeValue;echo '标题:'.$title .'\u003Cbr\u003E';echo '作者:'.$author .'\u003Cbr\u003E';echo '正文内容:'.$content .'\u003Cbr\u003E';?\u003E\n六、使用代理IP提高爬虫效率\n\nhttps:\u002F\u002Fwww.720yun.com\u002Fvr\u002F03ejzskf5k2\nhttps:\u002F\u002Fwww.720yun.com\u002Fvr\u002F1edjzskf5m8\nhttps:\u002F\u002Fwww.720yun.com\u002Fvr\u002F467jzskf5n2\n\n在爬虫程序运行过程中,我们可能会遇到被封IP的情况。为了规避这种情况,我们可以使用代理IP来提高爬虫效率和稳定性。\n\n代码实现如下:\n\n9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$proxy_ip ='your_proxy_ip';$proxy_port ='your_proxy_port';$ch = curl_init();curl_setopt($ch, CURLOPT_PROXY,$proxy_ip);curl_setopt($ch, CURLOPT_PROXYPORT,$proxy_port);curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);$output = curl_exec($ch);curl_close($ch);?\u003E\n七、使用多线程提高爬虫效率\n\n在处理大量数据时,单线程的爬虫程序可能会因为速度过慢而无法满足需求。为了提高爬虫效率,我们可以使用多线程技术来加速爬虫程序。\n\n代码实现如下:\n\n9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$urls = array( 'url1', 'url2', 'url3', \u002F\u002F...);$mh = curl_multi_init();$handles = array();foreach ($urls as $url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_multi_add_handle($mh,$ch); $handles[]=$ch;}$running = null;do { curl_multi_exec($mh,$running);} while ($running);foreach ($handles as $ch){ curl_multi_remove_handle($mh,$ch);}curl_multi_close($mh);?\u003E\n八、使用正则表达式解析HTML数据\n\n在解析HTML数据时,我们可以使用正则表达式来提取我们所需要的内容。以下是一些常用的正则表达式:\n\n\n提取标题:\n\nphppreg_match('\u002F\u003Ctitle\u003E(.*)\u003C\\\u002Ftitle\u003E\u002F',$html,$matches);$title =$matches[1];\n提取作者:\n\nphppreg_match('\u002F\u003Cspan class=\"rich_media_meta rich_media_meta_text\"\u003E(.*?)\u003C\\\u002Fspan\u003E\u002F',$html,$matches);$author = trim(strip_tags($matches[1]));\n提取正文内容:\n\nphppreg_match_all('\u002F\u003Cp\u003E(.*?)\u003C\\\u002Fp\u003E\u002F',$html,$matches);$content = implode('',$matches[1]);\n九、总结\n\n通过本文的介绍,我们了解了如何使用php编写爬虫程序来获取微信文章信息。具体而言,我们需要先申请微信公众平台开发者账号,并创建一个测试账号。然后,我们需要获取access_token,使用该token来调用微信公众平台提供的API接口,获取文章列表和文章内容。在实际应用中,我们还可以使用代理IP和多线程技术来提高爬虫效率和稳定性。",html:"\u003Cp\u003E微信公众号成为了现代人获取资讯的主要途径之一,然而每天需要手动打开公众号查看最新文章,不仅费时费力,而且易错漏。那么有没有一种方法可以自动化地获取微信文章呢?答案是有的,只需要使用php编写爬虫程序即可。本文将详细介绍如何使用php爬取微信文章,并提供完整的代码实现。\u003C\u002Fp\u003E\n\u003Cp\u003E一、了解微信公众平台\u003C\u002Fp\u003E\n\u003Cp\u003E在开始编写爬虫程序前,我们需要先了解微信公众平台的基本结构和API接口。微信公众平台是一个基于微信开发的应用平台,包括订阅号、服务号、企业号和小程序等。其中订阅号和服务号是我们在日常生活中最为熟悉的两种类型。为了获取最新的文章信息,我们需要使用到微信公众平台提供的API接口——获取公众号历史文章接口。\u003C\u002Fp\u003E\n\u003Cp\u003E二、申请微信公众平台开发者账号\u003C\u002Fp\u003E\n\u003Cp\u003E在使用微信公众平台API接口前,我们需要先申请开发者账号,并创建一个测试账号。具体操作步骤可以参考官方文档:\u003C\u002Fp\u003E\n\u003Cp\u003E三、获取access_token\u003C\u002Fp\u003E\n\u003Cp\u003E在使用微信公众平台API接口前,我们需要先获取access_token,该token是访问API接口的唯一凭证。获取access_token的方法有多种,这里我们介绍一个简单的方法——使用curl发送GET请求获取。\u003C\u002Fp\u003E\n\u003Cp\u003E代码实现如下:\u003C\u002Fp\u003E\n\u003Cp\u003E9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$appid ='your_appid';$appsecret ='your_appsecret';$url =\";appid={$appid}&secret={$appsecret}\";$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);$output = curl_exec($ch);curl_close($ch);$jsoninfo =6b75574d3f962e34b1fac1addebc32f4_decode($output, true);$access_token =$jsoninfo[\"access_token\"];?\u003E\u003C\u002Fp\u003E\n\u003Cp\u003E四、获取公众号历史文章列表\u003C\u002Fp\u003E\n\u003Cp\u003E使用微信公众平台提供的“获取公众号历史文章接口”,我们可以轻松地获取到公众号的历史文章列表。该接口返回的数据格式为JSON,包含了文章的标题、链接、封面图等信息。\u003C\u002Fp\u003E\n\u003Cp\u003E代码实现如下:\u003C\u002Fp\u003E\n\u003Cp\u003E9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$wechat_id ='your_wechat_id';$count = 10;\u002F\u002F返回文章数量$url =\"{$access_token}\";$data = array( 'type'=\u003E'news', 'offset'=\u003E0, 'count'=\u003E$count, 'tag_id'=\u003E$wechat_id,);$data =6b75574d3f962e34b1fac1addebc32f4_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS,$data);$output = curl_exec($ch);curl_close($ch);$jsoninfo =6b75574d3f962e34b1fac1addebc32f4_decode($output, true);\u002F\u002F解析JSON数据foreach ($jsoninfo['item'] as $item){ foreach ($item['content']['news_item'] as $news_item){ echo '标题:'.$news_item['title'].'\u003Cbr\u003E'; echo '链接:'.$news_item['url'].'\u003Cbr\u003E'; echo '封面图:'.$news_item['thumb_url'].'\u003Cbr\u003E\u003Cbr\u003E'; }}?\u003E\n五、获取微信文章内容\u003C\u002Fp\u003E\n\u003Cp\u003E获取到文章列表后,我们还需要进一步获取每篇文章的详细内容。使用微信公众平台提供的“获取公众号文章接口”,我们可以轻松地获取到文章的正文内容。该接口返回的数据格式为HTML,包含了文章的标题、作者、正文内容等信息。\u003C\u002Fp\u003E\n\u003Cp\u003E代码实现如下:\u003C\u002Fp\u003E\n\u003Cp\u003E9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$wechat_id ='your_wechat_id';$url =\"{$access_token}\";$data = array( 'media_id'=\u003E'your_media_id',);$data =6b75574d3f962e34b1fac1addebc32f4_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);curl_setopt($ch, CURLOPT_POST,1);curl_setopt($ch, CURLOPT_POSTFIELDS,$data);$output = curl_exec($ch);curl_close($ch);\u002F\u002F解析HTML数据$doc = new DOMDocument();$doc-\u003EloadHTML($output);$title =$doc-\u003EgetElementsByTagName('title')-\u003Eitem(0)-\u003EnodeValue;$author =$doc-\u003EgetElementsByTagName('author')-\u003Eitem(0)-\u003EnodeValue;$content =$doc-\u003EgetElementsByTagName('content')-\u003Eitem(0)-\u003EnodeValue;echo '标题:'.$title .'\u003Cbr\u003E';echo '作者:'.$author .'\u003Cbr\u003E';echo '正文内容:'.$content .'\u003Cbr\u003E';?\u003E\n六、使用代理IP提高爬虫效率\u003C\u002Fp\u003E\n\u003Cp\u003E\u003Ca href=\"https:\u002F\u002Fwww.720yun.com\u002Fvr\u002F03ejzskf5k2\"\u003Ehttps:\u002F\u002Fwww.720yun.com\u002Fvr\u002F03ejzskf5k2\u003C\u002Fa\u003E\n\u003Ca href=\"https:\u002F\u002Fwww.720yun.com\u002Fvr\u002F1edjzskf5m8\"\u003Ehttps:\u002F\u002Fwww.720yun.com\u002Fvr\u002F1edjzskf5m8\u003C\u002Fa\u003E\n\u003Ca href=\"https:\u002F\u002Fwww.720yun.com\u002Fvr\u002F467jzskf5n2\"\u003Ehttps:\u002F\u002Fwww.720yun.com\u002Fvr\u002F467jzskf5n2\u003C\u002Fa\u003E\u003C\u002Fp\u003E\n\u003Cp\u003E在爬虫程序运行过程中,我们可能会遇到被封IP的情况。为了规避这种情况,我们可以使用代理IP来提高爬虫效率和稳定性。\u003C\u002Fp\u003E\n\u003Cp\u003E代码实现如下:\u003C\u002Fp\u003E\n\u003Cp\u003E9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$proxy_ip ='your_proxy_ip';$proxy_port ='your_proxy_port';$ch = curl_init();curl_setopt($ch, CURLOPT_PROXY,$proxy_ip);curl_setopt($ch, CURLOPT_PROXYPORT,$proxy_port);curl_setopt($ch, CURLOPT_URL,$url);curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);$output = curl_exec($ch);curl_close($ch);?\u003E\n七、使用多线程提高爬虫效率\u003C\u002Fp\u003E\n\u003Cp\u003E在处理大量数据时,单线程的爬虫程序可能会因为速度过慢而无法满足需求。为了提高爬虫效率,我们可以使用多线程技术来加速爬虫程序。\u003C\u002Fp\u003E\n\u003Cp\u003E代码实现如下:\u003C\u002Fp\u003E\n\u003Cp\u003E9328af9636bb3add707425d0a89494f5\u003C?9328af9636bb3add707425d0a89494f5$urls = array( 'url1', 'url2', 'url3', \u002F\u002F...);$mh = curl_multi_init();$handles = array();foreach ($urls as $url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_multi_add_handle($mh,$ch); $handles[]=$ch;}$running = null;do { curl_multi_exec($mh,$running);} while ($running);foreach ($handles as $ch){ curl_multi_remove_handle($mh,$ch);}curl_multi_close($mh);?\u003E\n八、使用正则表达式解析HTML数据\u003C\u002Fp\u003E\n\u003Cp\u003E在解析HTML数据时,我们可以使用正则表达式来提取我们所需要的内容。以下是一些常用的正则表达式:\u003C\u002Fp\u003E\n\u003Cp\u003E提取标题:\u003C\u002Fp\u003E\n\u003Cp\u003Ephppreg_match('\u002F\u003Ctitle\u003E(.*)<\u002Ftitle>\u002F',$html,$matches);$title =$matches[1];\n提取作者:\u003C\u002Fp\u003E\n\u003Cp\u003Ephppreg_match('\u002F\u003Cspan class=\"rich_media_meta rich_media_meta_text\"\u003E(.*?)<\u002Fspan>\u002F',$html,$matches);$author = trim(strip_tags($matches[1]));\n提取正文内容:\u003C\u002Fp\u003E\n\u003Cp\u003Ephppreg_match_all('\u002F\u003Cp\u003E(.*?)<\u002Fp>\u002F',$html,$matches);$content = implode('',$matches[1]);\n九、总结\u003C\u002Fp\u003E\n\u003Cp\u003E通过本文的介绍,我们了解了如何使用php编写爬虫程序来获取微信文章信息。具体而言,我们需要先申请微信公众平台开发者账号,并创建一个测试账号。然后,我们需要获取access_token,使用该token来调用微信公众平台提供的API接口,获取文章列表和文章内容。在实际应用中,我们还可以使用代理IP和多线程技术来提高爬虫效率和稳定性。\u003C\u002Fp\u003E",tags:"[{\"id\":0,\"uuid\":\"93101462\",\"name\":\"PHP\",\"icon\":\"icon-Python\",\"status\":0,\"createTime\":\"0001-01-01T00:00:00Z\",\"updateTime\":\"0001-01-01T00:00:00Z\",\"action\":10}]",homeImg:b,createTime:"2024-03-28T15:32:10.371678+08:00",updateTime:"2024-03-28T15:39:54.529306+08:00",publishTime:"2024-03-28T15:39:54.529307+08:00",readCount:353,favoriteCount:a,zanCount:a,isAuthorBlog:c},otherBlogList:[{uuid:"8150596603",title:"北京房屋租赁开发票!怎么开具!"},{uuid:"0312229293",title:"重庆开劳务费发票!步骤!"},{uuid:"7924686689",title:"利用IEC 62443标准提升基础设施网络安全"},{uuid:"2327153517",title:"骆云:营造好房子,做产品主义的践行者"},{uuid:"1124968194",title:"苹果可能在国内设备使用百度AI技术:集成于iOS 18"}],recommendBlogList:[{uuid:"9789260596",title:"微标题信公众号文章,阅读数,点赞数历史文章抓取",title2:b,intro:"微标题信公众号文章,阅读数,点赞数历史文章抓取需求最近在做舆情与微信文章相关的数据抓取,发现微信公众号有些难点很难克服。市面上流行的数据抓取思路要么被腾讯封杀,要么操作难度大。解决方案搜狗微信无法采集历史,而且搜索也不按时间排序。获取的数据的价值不高,仅仅可以通过他获取公众号的biz。微信公众平台微信公",createTime:d,updateTime:d,publishTime:"2021-03-22T15:04:39+08:00",homeImg:b,readCount:1920,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:"boring_coder",nicker:"无聊的调包专家",avatar:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002F412212ed61b168f93f528f66067b7774.jfif",collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"7946785238",title:"如何将Markdown文章轻松地搬运到微信公众号并完美地呈现代码内容",title2:b,intro:"相信有很多童鞋跟我一样,热衷于用Markdown来编写文章。由于其简单的语法和清晰的渲染效果,受到广大码农朋友们的推崇。但是,当我们想维护起自己的公众号时,公众号编辑器往往让我们费劲了脑汁。本人尝试了各种工具,比如:秀米一些在线提供多种不同样式的编辑器。虽然这些编辑器都能够完成编辑任务,但是效果并不理想。与我们所追求的简洁、清晰风格总是格格不入,尤其是对于代",createTime:d,updateTime:d,publishTime:"2021-03-08T22:02:47+08:00",homeImg:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fabf674b71c937ef772244d52d7fa511e.png",readCount:1764,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:"k8s",nicker:"DevOpSec",avatar:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002F029f3db4e28f2d8b1b0e861c3ba11a97.png",collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"5763697557",title:"PHP 微信公众号消息加解密",title2:b,intro:"公众号配置根据提示设置即可:【图中信息均为无意义数据,仅供参考。注意服务器地址需可接收GET\u002FPOST两种请求】AESKey直接点一下随机生成即可,Token可以生成一个UUID再把UUID进行MD5一次即可。接收关注事件消息示例请求参数校验这一步根据项目情况,可供参考:(Lumen框架)php$valida",createTime:d,updateTime:d,publishTime:"2021-03-29T14:43:25+08:00",homeImg:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002F2c84ea5ec497c071679aa03f9808b5a7.png",readCount:1781,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:u,nicker:u,avatar:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002Faf6c39b7943316730c36434571bd04cd.jpg",collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"5520528602",title:"PHP微信小程序支付——签名错误 ",title2:b,intro:"!(https:\u002F\u002Fstatic.oschina.net\u002Fuploads\u002Fspace\u002F2018\u002F0509\u002F141657_Tqix_3477605.png)先分清几个概念:微信公众平台、微信开放平台、微信商户平台1.微信公众平台、微信开放平台、微信商户平台是三个不同的平台2.微信公众平台:用于公众号、小程序等等的设置平台,包括APPID、APP",createTime:d,updateTime:d,publishTime:"2021-10-11T10:04:21+08:00",homeImg:b,readCount:1344,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:e,nicker:e,avatar:g,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"9724810047",title:"Markdown 简明语法 ",title2:b,intro:"关注我,每天都有优质技术文章推送,工作,学习累了的时候放松一下自己。本篇文章同步微信公众号欢迎大家关注我的微信公众号:「醉翁猫咪」!(https:\u002F\u002Foscimg.oschina.net\u002Foscnet\u002Fup1d5ae683f66a54eb857ab1a178a657b6.jpg)今天我们了解一下什么是Markdow",createTime:d,updateTime:d,publishTime:"2021-10-11T21:45:26+08:00",homeImg:b,readCount:904,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:h,nicker:h,avatar:v,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"6194105321",title:"Java 8 创建 Stream 的 10 种方式,我保证你受益无穷! ",title2:b,intro:"之前栈长分享过Java8一系列新特性的文章,其中重点介绍了Stream.!(http:\u002F\u002Fimg.javastack.cn\u002F20190613135450.png)!(http:\u002F\u002Fimg.javastack.cn\u002F20190613135537.png)获取上面这份Java8~12系列新特性干货文章,请在微信搜索关注微信公众号:",createTime:d,updateTime:d,publishTime:"2021-10-11T09:03:50+08:00",homeImg:b,readCount:740,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:e,nicker:e,avatar:g,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"5421177182",title:"Blob分析",title2:b,intro:"文章转自微信公众号:机器视觉那些事\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\公众号:机器视觉那些事儿\\\\\\\\\\\\",createTime:d,updateTime:d,publishTime:"2021-10-11T15:49:14+08:00",homeImg:b,readCount:737,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:h,nicker:h,avatar:v,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"6235848117",title:"10分钟上线 ",title2:b,intro:"_摘要:_ 阿里云函数计算是一个事件驱动的全托管计算服务。通过函数计算,您无需管理服务器等基础设施,只需编写代码并上传。微信小程序是一种不需要下载安装即可使用的应用,它可以在微信内被便捷地获取和传播。当微信小程序遇见serverless,他们会产生奇妙火花,利用函数计算可以快速搭建微信小程序的serverle.点此查看原文:http:\u002F\u002Fclic",createTime:d,updateTime:d,publishTime:"2021-10-11T10:51:46+08:00",homeImg:b,readCount:675,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:e,nicker:e,avatar:g,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"4174793208",title:"C# 软件开机启动 ",title2:b,intro:"如果需要查看更多文章,请微信搜索公众号csharp编程大全,需要进C交流群群请加微信z438679770,备注进群,我邀请你进群!!!usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentMod",createTime:d,updateTime:d,publishTime:"2021-10-11T08:36:29+08:00",homeImg:b,readCount:672,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:e,nicker:e,avatar:g,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b},{uuid:"0007112332",title:"用PHP获取微信公众号文章,轻松实现!",title2:b,intro:"微信公众号已经成为了很多人获取信息的重要途径,而在开发中,有时候需要通过代码来获取公众号文章。PHP作为一种广泛应用的Web编程语言,也可以实现这一功能。本文将详细介绍PHP如何获取微信公众号文章。一、准备工作在开始之前,我们需要先准备好以下两个东西:一个",createTime:d,updateTime:d,publishTime:"2024-03-28T15:39:55.439606+08:00",homeImg:b,readCount:588,zanCount:a,favoriteCount:a,status:a,commentCount:a,profile:w,nicker:x,avatar:y,collectionId:a,recommendStatus:a,userStatus:a,auditReason:b}],userInfo:{profile:w,avatar:y,nicker:x,level:a,job:b,company:b,sex:i,slogan:"一分钱难倒英雄汉!",blogCount:47,fansCount:i,zanCount:a,followed:c,isZaned:c,isFavorited:c,webEnable:a,website:b,websiteDomain:b,wechatQrcode:b,wechatOfficialAccount:b}},currentCateId:b,recommendSpecialList:[],userAndBlogActionInfo:{},isLoading:c,isFinished:c,searchList:[],isLoadingSearch:c,isFinishedSearch:c,recommendLessonList:[],recommendLessonListByBlog:[{id:19,uuid:"1935098869",userId:z,name:"Java synchronized同步关键字背后的原理与源码实现 ",subtitle:"为了完成Java源码版本的 synchronized实现,期间经历了太多的通知与折磨,灵光一现到落实到真正的Java源码,还是很不容易的。写代码过程非常爽,但是测试过程蹦出来的bug差点让我放弃,多线程环境下bug变得非常非常隐蔽。原本计划5天写完的,结果硬生生的被bug折磨了4天。造这个轮子的目的很简单,主要是为了解决大家阅读C++版本的synchronized的屏障。并且手写了一套Java版本的Synchronized实现。",content:b,html:b,price:13900,discountAmount:3000,status:A,reason:b,level:4,type:2,mark:a,canRefund:a,cover:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002Fb198ef1a1d11a9c6e81531134cc3327a.png",payCount:56,updatedAt:"2023-07-18T21:38:20.594994+08:00",createdAt:"2023-07-18T07:58:58.633126+08:00",deletedAt:f},{id:65,uuid:"7011629094",userId:z,name:"Andriod设计模式实战",subtitle:"结合Andriod知识点讲解设计模式实战",content:b,html:b,price:a,discountAmount:a,status:A,reason:b,level:3,type:i,mark:a,canRefund:a,cover:"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002F80fd22993d90e1283227f808922efd96.png",payCount:37,updatedAt:"2023-08-29T00:40:06.110205+08:00",createdAt:"2023-08-28T21:22:26.082877+08:00",deletedAt:f}]},special:{mostSpecialCountUserList:[],specialList:[],specialCateList:[],bannerList:[],specialDetail:{},specialDetailList:{},chapterList:[],specialListByCate:[],mySpecialDetail:f,isLoading:c,isFinished:c},tutorial:{bigCateList:[],tutorialData:[],tutorialDetail:{},chapterList:[],tutorialOverview:{}}},serverRendered:t,routePath:"\u002Fp\u002F9398208964",config:{_app:{basePath:"\u002F",assetsPath:"\u002F_nuxt\u002F",cdnURL:f}}}}(0,"",false,"0001-01-01T00:00:00Z","Wesley13",null,"https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002F46847d754406b0102dee7a1f54d14f92.jfif","Stella981",1,"\u002Fmanage\u002FgetCollectionList","\u002Fmanage\u002FgetMyBlogDetail","\u002Fspecial\u002FupdateSection","\u002Fmanage\u002FgetMySectionDetail","\u002Fspecial\u002FsubscribeSpecial","\u002Fspecial\u002FunSubscribeSpecial","\u002Fspecial\u002FmodifySpecial","\u002Ftutorial\u002FgetTutorialList","\u002Ftutorial\u002FgetTutorialDetail","\u002Faccess\u002FmodifyPassword",true,"MaxSky","https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002F1bad3e5246214111b0d7a482fc5beec5.jfif","2439386182","linbojue","https:\u002F\u002Fimg-hello-world.oss-cn-beijing.aliyuncs.com\u002Fimgs\u002F149224f1f9d816d2f9fead5fe1db454b.jpg",7689,30));</script><script src="/_nuxt/hw.165.js?t=1727528274054" defer></script><script src="/_nuxt/hw.116.js?t=1727528274054" defer></script><script src="/_nuxt/hw.0.js?t=1727528274054" defer></script><script src="/_nuxt/hw.1.js?t=1727528274054" defer></script><script src="/_nuxt/hw.2.js?t=1727528274054" defer></script><script src="/_nuxt/hw.166.js?t=1727528274054" defer></script><script src="/_nuxt/hw.14.js?t=1727528274054" defer></script><script src="/_nuxt/hw.171.js?t=1727528274054" defer></script><script src="/_nuxt/hw.15.js?t=1727528274054" defer></script> </body> </html>