如何通过 API 查看 cnblogs 博客访问量和博客积分与排名 All In One
如何通过 API 查看 cnblogs 博客访问量和博客排名 All In One
开启配置
https://i.cnblogs.com/preference
博客访问量 API
https://www.cnblogs.com/`username`/ajax/blogStats
博客排名 API
https://www.cnblogs.com/`username`/ajax/sidecolumn.aspx
demos
博客访问量
随笔 - 5752 文章 - 1 评论 - 18139 阅读 - 174万
https://www.cnblogs.com/xgqfrms/ajax/blogStats
<body data-new-gr-c-s-check-loaded="14.1107.0" data-gr-ext-installed=""><span id="stats_post_count">随笔 - 5751 </span>
<span id="stats_article_count">文章 - 1 </span>
<span id="stats-comment_count">评论 - 18138 </span>
<span id="stats-total-view-count">阅读 - <span title="总阅读数: 1746866">174万</span></span>
</body>
博客积分与排名
积分 - 1491711
排名 - 138
https://www.cnblogs.com/xgqfrms/ajax/sidecolumn.aspx
<!-- 积分与排名 -->
<div id="sidebar_scorerank" class="sidebar-block"><div class="catListBlogRank">
<h3 class="catListTitle">积分与排名</h3>
<ul>
<li class="liScore">
积分 - 1491711
</li>
<li class="liRank">
排名 - 138
</li>
</ul>
</div>
fetch("https://www.cnblogs.com/xgqfrms/ajax/sidecolumn.aspx", {
"headers": {
"accept": "text/plain, */*; q=0.01",
"accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ko;q=0.6",
"cache-control": "no-cache",
"pragma": "no-cache",
"sec-ch-ua": "\"Google Chrome\";v=\"111\", \"Not(A:Brand\";v=\"8\", \"Chromium\";v=\"111\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://www.cnblogs.com/xgqfrms/",
"referrerPolicy": "origin-when-cross-origin",
"body": null,
"method": "GET",
"mode": "cors",
"credentials": "include"
});
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
https://zzk.cnblogs.com/my/s/blogpost-p?Keywords=cnblogs
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17365969.html
未经授权禁止转载,违者必究!