8-4 公众号历史文章信息 - 图1

抓取的结果信息包含:

  • 文章标题
  • 文章内容链接
  • 文章发布时间
  • 文章摘要·

    结果示例图:

    8-4 公众号历史文章信息 - 图2

    模板:

    1. {"_id":"gongzhonghao-articles","startUrl":["https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIxODUxMDM5MQ==&scene=124&#wechat_redirect"],"selectors":[{"id":"info","type":"SelectorElement","parentSelectors":["_root"],"selector":"div.weui_media_box","multiple":true,"delay":0},{"id":"title","type":"SelectorText","parentSelectors":["info"],"selector":"h4","multiple":false,"regex":"","delay":0},{"id":"linke","type":"SelectorElementAttribute","parentSelectors":["info"],"selector":"h4","multiple":false,"extractAttribute":"hrefs","delay":0},{"id":"time","type":"SelectorText","parentSelectors":["info"],"selector":"p.weui_media_extra_info","multiple":false,"regex":"","delay":0},{"id":"intro","type":"SelectorText","parentSelectors":["info"],"selector":"p.weui_media_desc","multiple":false,"regex":"","delay":0}]}

    模板套用步骤:

    (1)安装旧版本的电脑微信(必做,否则下面操作都无法进行

mac 电脑下载链接:链接: https://pan.baidu.com/s/1kv91WWl-8pFbdFnrkUUeiw 密码: 4pik
windows电脑下载链接:链接: https://pan.baidu.com/s/1w5yKmBNpg5fxjfl8yxW9tw 密码: hq5p

如何验证安装成功?如下图:

image (24).png

显示 2.3.16(11023) 版本则正确。

(2)在浏览器打开需要抓取的公众号历史文章页面,例如:https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzIxODUxMDM5MQ==&scene=124&#wechat_redirect
(3)导入模板
(4)替换 Start URL为要抓取的网页链接
(5)全选 -> 复制 ->粘贴到 excel 文件里
(6)删除杂乱数据