🤪解决内存异常占用问题,美化页面
This commit is contained in:
parent
e5384ce6c0
commit
b32673d78a
446
all.json
446
all.json
@ -1,12 +1,40 @@
|
||||
{
|
||||
"statistical_data": {
|
||||
"friends_num": 80,
|
||||
"active_num": 62,
|
||||
"error_num": 18,
|
||||
"article_num": 281,
|
||||
"last_updated_time": "2024-07-28 14:28:11"
|
||||
"friends_num": 81,
|
||||
"active_num": 72,
|
||||
"error_num": 9,
|
||||
"article_num": 329,
|
||||
"last_updated_time": "2024-07-28 21:25:05"
|
||||
},
|
||||
"article_data": [
|
||||
{
|
||||
"title": "c++指针",
|
||||
"created": "2024-07-29 05:00",
|
||||
"link": "https://blog.zhwei.tech/index.php/archives/277/",
|
||||
"author": "ZHI-BLOG",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/06/01/665a9a8f8418a.png"
|
||||
},
|
||||
{
|
||||
"title": "所有文章",
|
||||
"created": "2024-07-28 20:28",
|
||||
"link": "https://blog.hesiy.cn/posts/",
|
||||
"author": "FloatSheep",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/28/66a6324891ba1.webp"
|
||||
},
|
||||
{
|
||||
"title": "关于本站|Solitude主题魔改内容",
|
||||
"created": "2024-07-28 19:00",
|
||||
"link": "https://blog.starsharbor.com/posts/solitude-changefiles/",
|
||||
"author": "星港Star",
|
||||
"avatar": "https://bu.dusays.com/2023/09/27/6513053bebdb2.webp"
|
||||
},
|
||||
{
|
||||
"title": "Linux中Cron定时任务的踩坑",
|
||||
"created": "2024-07-28 16:57",
|
||||
"link": "https://www.hitagi.icu/posts/ec44b35f/",
|
||||
"author": "Hitagi",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/07/668a9e330dc6a.webp"
|
||||
},
|
||||
{
|
||||
"title": "htcsp语法补强//顺序结构 数组 字符串 函数 递归",
|
||||
"created": "2024-07-28 03:28",
|
||||
@ -21,6 +49,13 @@
|
||||
"author": "ZHI-BLOG",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/06/01/665a9a8f8418a.png"
|
||||
},
|
||||
{
|
||||
"title": "【日记】2024.07.27",
|
||||
"created": "2024-07-27 23:10",
|
||||
"link": "https://www.xingmail.cn/journal-of-2024-07-27/",
|
||||
"author": "往日信笺",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/14/661bf476a6d8d.png"
|
||||
},
|
||||
{
|
||||
"title": "通过Webdav给群晖挂载115网盘",
|
||||
"created": "2024-07-27 21:06",
|
||||
@ -42,6 +77,27 @@
|
||||
"author": "乙未博客",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f05e2f75c.png"
|
||||
},
|
||||
{
|
||||
"title": "【日记】2024.07.26",
|
||||
"created": "2024-07-26 21:01",
|
||||
"link": "https://www.xingmail.cn/journal-of-2024-07-26/",
|
||||
"author": "往日信笺",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/14/661bf476a6d8d.png"
|
||||
},
|
||||
{
|
||||
"title": "安卓手机端免费音乐下载神器-音乐适配:无需付费/免费听音乐/免费匹配歌词",
|
||||
"created": "2024-07-26 19:49",
|
||||
"link": "https://www.bbixb.top/archives/1565",
|
||||
"author": "微生之最",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/04/66351f5b62b65.png"
|
||||
},
|
||||
{
|
||||
"title": "科技爱好者周刊(第 310 期):内容农场的 AI 赚钱术",
|
||||
"created": "2024-07-26 08:05",
|
||||
"link": "http://www.ruanyifeng.com/blog/2024/07/weekly-issue-310.html",
|
||||
"author": "阮一峰",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/29/662fbca75b9fe.png"
|
||||
},
|
||||
{
|
||||
"title": "空气炸锅维修",
|
||||
"created": "2024-07-26 05:58",
|
||||
@ -77,6 +133,13 @@
|
||||
"author": "杜老师说",
|
||||
"avatar": "https://cdn.dusays.com/avatar.png"
|
||||
},
|
||||
{
|
||||
"title": "【日记】2024.07.25",
|
||||
"created": "2024-07-25 23:28",
|
||||
"link": "https://www.xingmail.cn/journal-of-2024-07-25/",
|
||||
"author": "往日信笺",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/14/661bf476a6d8d.png"
|
||||
},
|
||||
{
|
||||
"title": "华为 Pura 70 Pro — 不完美的 GMS 体验",
|
||||
"created": "2024-07-25 11:23",
|
||||
@ -84,6 +147,13 @@
|
||||
"author": "obaby",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/15/661d443b5359c.png"
|
||||
},
|
||||
{
|
||||
"title": "【日记】2024.07.24",
|
||||
"created": "2024-07-24 22:44",
|
||||
"link": "https://www.xingmail.cn/journal-of-2024-07-24/",
|
||||
"author": "往日信笺",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/14/661bf476a6d8d.png"
|
||||
},
|
||||
{
|
||||
"title": "利用 Cron 编写简单的定时脚本(含简易的 CDN 攻击预警)",
|
||||
"created": "2024-07-24 22:43",
|
||||
@ -119,6 +189,13 @@
|
||||
"author": "星港Star",
|
||||
"avatar": "https://bu.dusays.com/2023/09/27/6513053bebdb2.webp"
|
||||
},
|
||||
{
|
||||
"title": "【日记】2024.07.23",
|
||||
"created": "2024-07-23 23:12",
|
||||
"link": "https://www.xingmail.cn/journal-of-2024-07-23/",
|
||||
"author": "往日信笺",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/14/661bf476a6d8d.png"
|
||||
},
|
||||
{
|
||||
"title": "哔哩哔哩视频下载方法大汇总",
|
||||
"created": "2024-07-23 20:59",
|
||||
@ -161,13 +238,6 @@
|
||||
"author": "杜老师说",
|
||||
"avatar": "https://cdn.dusays.com/avatar.png"
|
||||
},
|
||||
{
|
||||
"title": "ZHWEI-TXL使用文档-视频",
|
||||
"created": "2024-07-22 06:29",
|
||||
"link": "https://blog.zhwei.tech/index.php/archives/180/",
|
||||
"author": "ZHI-BLOG",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/06/01/665a9a8f8418a.png"
|
||||
},
|
||||
{
|
||||
"title": "Typecho后台轻简美化增强插件-AdminElegance",
|
||||
"created": "2024-07-21 22:43",
|
||||
@ -238,6 +308,13 @@
|
||||
"author": "刘郎阁",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/19/66229406a68df.png"
|
||||
},
|
||||
{
|
||||
"title": "科技爱好者周刊(第 309 期):无人驾驶出租车的双面刃",
|
||||
"created": "2024-07-19 08:09",
|
||||
"link": "http://www.ruanyifeng.com/blog/2024/07/weekly-issue-309.html",
|
||||
"author": "阮一峰",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/29/662fbca75b9fe.png"
|
||||
},
|
||||
{
|
||||
"title": "我为下一届辩论新生留下的文字",
|
||||
"created": "2024-07-19 05:42",
|
||||
@ -336,6 +413,13 @@
|
||||
"author": "湘铭",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/19/6622928fc416c.png"
|
||||
},
|
||||
{
|
||||
"title": "白嫖PokePay的U卡",
|
||||
"created": "2024-07-15 20:02",
|
||||
"link": "https://blog.qjqq.cn/posts/4226.html",
|
||||
"author": "青桔气球",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/661241402f02a.png"
|
||||
},
|
||||
{
|
||||
"title": "HTML前端图表应用",
|
||||
"created": "2024-07-15 17:04",
|
||||
@ -357,6 +441,41 @@
|
||||
"author": "张洪Heo",
|
||||
"avatar": "https://bu.dusays.com/2022/12/28/63ac2812183aa.png"
|
||||
},
|
||||
{
|
||||
"title": "肺系病的方证用药",
|
||||
"created": "2024-07-15 02:28",
|
||||
"link": "https://www.henjinet.com/archives/513.html",
|
||||
"author": "痕迹小站",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659688bbf14b.png"
|
||||
},
|
||||
{
|
||||
"title": "肺痿部分的证治分类",
|
||||
"created": "2024-07-15 02:08",
|
||||
"link": "https://www.henjinet.com/archives/504.html",
|
||||
"author": "痕迹小站",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659688bbf14b.png"
|
||||
},
|
||||
{
|
||||
"title": "肺胀部分的证治分类",
|
||||
"created": "2024-07-15 02:07",
|
||||
"link": "https://www.henjinet.com/archives/503.html",
|
||||
"author": "痕迹小站",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659688bbf14b.png"
|
||||
},
|
||||
{
|
||||
"title": "肺痨部分的证治分类",
|
||||
"created": "2024-07-15 02:05",
|
||||
"link": "https://www.henjinet.com/archives/502.html",
|
||||
"author": "痕迹小站",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659688bbf14b.png"
|
||||
},
|
||||
{
|
||||
"title": "肺痈部分的证治分类",
|
||||
"created": "2024-07-15 02:02",
|
||||
"link": "https://www.henjinet.com/archives/501.html",
|
||||
"author": "痕迹小站",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659688bbf14b.png"
|
||||
},
|
||||
{
|
||||
"title": "近日总结:期末&软路由",
|
||||
"created": "2024-07-14 16:55",
|
||||
@ -378,6 +497,13 @@
|
||||
"author": "凉心",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/24/66500d797ac38.png"
|
||||
},
|
||||
{
|
||||
"title": "一串代码解决老爷机上Windows的TPM 2.0(受信任的平台模块验证)和cpu限制",
|
||||
"created": "2024-07-13 17:39",
|
||||
"link": "https://www.bbixb.top/archives/1513",
|
||||
"author": "微生之最",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/04/66351f5b62b65.png"
|
||||
},
|
||||
{
|
||||
"title": "Typecho 调取随机文章",
|
||||
"created": "2024-07-13 17:26",
|
||||
@ -406,6 +532,13 @@
|
||||
"author": "刘郎阁",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/19/66229406a68df.png"
|
||||
},
|
||||
{
|
||||
"title": "科技爱好者周刊(第 308 期):工作找不到,博士能读吗?",
|
||||
"created": "2024-07-12 08:19",
|
||||
"link": "http://www.ruanyifeng.com/blog/2024/07/weekly-issue-308.html",
|
||||
"author": "阮一峰",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/29/662fbca75b9fe.png"
|
||||
},
|
||||
{
|
||||
"title": "宝塔如何单独给一个网站设置nginx缓存目录,延长和持久化图床缓存",
|
||||
"created": "2024-07-11 14:52",
|
||||
@ -434,6 +567,13 @@
|
||||
"author": "微霞",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116f0fe045d.png"
|
||||
},
|
||||
{
|
||||
"title": "专业激活版顶级安卓手机清理神器:CCleaner,一款知名的系统优化/隐私保护/垃圾清理神器",
|
||||
"created": "2024-07-10 16:37",
|
||||
"link": "https://www.bbixb.top/archives/1506",
|
||||
"author": "微生之最",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/04/66351f5b62b65.png"
|
||||
},
|
||||
{
|
||||
"title": "halo 插件开发中的一些踩坑记录",
|
||||
"created": "2024-07-10 14:52",
|
||||
@ -448,6 +588,13 @@
|
||||
"author": "辞琼",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/27/662d1c9b7efe1.png"
|
||||
},
|
||||
{
|
||||
"title": "软云(服务器商家)跑路了",
|
||||
"created": "2024-07-08 21:40",
|
||||
"link": "https://pipuwong.com/the-vps-hosting-services-shut-down-without-prior-notice",
|
||||
"author": "皮普",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f1b29c34a.png"
|
||||
},
|
||||
{
|
||||
"title": "高效利用 GitHub 搜索,精准快速获取所需",
|
||||
"created": "2024-07-08 18:27",
|
||||
@ -518,6 +665,13 @@
|
||||
"author": "清羽飞扬",
|
||||
"avatar": "https://blog.qyliu.top/info/avatar.ico"
|
||||
},
|
||||
{
|
||||
"title": "使用窗口放大软件:losslessscaling,解决电脑端植物大战僵尸杂交版和各种小游戏无法全屏的问题",
|
||||
"created": "2024-07-04 20:07",
|
||||
"link": "https://www.bbixb.top/archives/1491",
|
||||
"author": "微生之最",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/04/66351f5b62b65.png"
|
||||
},
|
||||
{
|
||||
"title": "彗星云跑路了",
|
||||
"created": "2024-07-04 11:45",
|
||||
@ -546,13 +700,6 @@
|
||||
"author": "星港Star",
|
||||
"avatar": "https://bu.dusays.com/2023/09/27/6513053bebdb2.webp"
|
||||
},
|
||||
{
|
||||
"title": "有损压缩格式详细介绍",
|
||||
"created": "2024-07-04 01:30",
|
||||
"link": "https://blog.starsharbor.com/posts/audio-format-3/",
|
||||
"author": "星港Star",
|
||||
"avatar": "https://bu.dusays.com/2023/09/27/6513053bebdb2.webp"
|
||||
},
|
||||
{
|
||||
"title": "Solitude:实用技巧",
|
||||
"created": "2024-07-04 00:00",
|
||||
@ -679,6 +826,13 @@
|
||||
"author": "爱吃肉的猫",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/66123cff10a83.png"
|
||||
},
|
||||
{
|
||||
"title": "为你的网站添加好看的悬浮音乐播放器-小枫音乐播放器/APlayer & MetingJS",
|
||||
"created": "2024-06-27 12:48",
|
||||
"link": "https://www.bbixb.top/archives/1362",
|
||||
"author": "微生之最",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/04/66351f5b62b65.png"
|
||||
},
|
||||
{
|
||||
"title": "数字信号的2FSK调制与解调",
|
||||
"created": "2024-06-27 04:13",
|
||||
@ -728,6 +882,13 @@
|
||||
"author": "风记星辰",
|
||||
"avatar": "https://std.thyuu.com/logo.svg"
|
||||
},
|
||||
{
|
||||
"title": "Solitude主题魔改(二):侧边栏个性时钟",
|
||||
"created": "2024-06-23 20:33",
|
||||
"link": "https://byer.top/posts/239dbb2d.html",
|
||||
"author": "星の野",
|
||||
"avatar": "https://bu.dusays.com/2023/10/01/6519291503349.jpg"
|
||||
},
|
||||
{
|
||||
"title": "OFDM学习过程及仿真",
|
||||
"created": "2024-06-23 20:07",
|
||||
@ -770,6 +931,13 @@
|
||||
"author": "葱苓sama",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/03/663458df4e6f0.png"
|
||||
},
|
||||
{
|
||||
"title": "Solitude主题魔改(一):首页三栏显示",
|
||||
"created": "2024-06-21 22:01",
|
||||
"link": "https://byer.top/posts/1161ac79.html",
|
||||
"author": "星の野",
|
||||
"avatar": "https://bu.dusays.com/2023/10/01/6519291503349.jpg"
|
||||
},
|
||||
{
|
||||
"title": "【开源项目】QtScrcpy:一个友好强大的Scrcpy升级版项目",
|
||||
"created": "2024-06-21 19:43",
|
||||
@ -847,6 +1015,13 @@
|
||||
"author": "星辰日记",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/66595f03d46be.png"
|
||||
},
|
||||
{
|
||||
"title": "光学系统远物镜设计报告",
|
||||
"created": "2024-06-16 18:46",
|
||||
"link": "https://tianli-blog.club/%e5%85%89%e5%ad%a6%e7%b3%bb%e7%bb%9f%e8%bf%9c%e7%89%a9%e9%95%9c%e8%ae%be%e8%ae%a1%e6%8a%a5%e5%91%8a/",
|
||||
"author": "Tianli",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116950412cc.png"
|
||||
},
|
||||
{
|
||||
"title": "VMware挂起后无法连接MySQL和Redis问题",
|
||||
"created": "2024-06-16 08:00",
|
||||
@ -1036,6 +1211,20 @@
|
||||
"author": "乙未博客",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f05e2f75c.png"
|
||||
},
|
||||
{
|
||||
"title": "开发了一个 Canvas 2D 渲染引擎",
|
||||
"created": "2024-05-23 22:15",
|
||||
"link": "https://www.qcqx.cn/article/8275f29.html",
|
||||
"author": "轻笑",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659628eddf20.png"
|
||||
},
|
||||
{
|
||||
"title": "Canvas 2D 事件",
|
||||
"created": "2024-05-23 18:52",
|
||||
"link": "https://www.qcqx.cn/article/5b168750.html",
|
||||
"author": "轻笑",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659628eddf20.png"
|
||||
},
|
||||
{
|
||||
"title": "什么是网站地图&怎么制作网站地图?",
|
||||
"created": "2024-05-22 17:02",
|
||||
@ -1043,6 +1232,13 @@
|
||||
"author": "luo",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/14/661be5ef23b3b.png"
|
||||
},
|
||||
{
|
||||
"title": "Canvas 2D 贝塞尔曲线",
|
||||
"created": "2024-05-22 10:27",
|
||||
"link": "https://www.qcqx.cn/article/ba04fd32.html",
|
||||
"author": "轻笑",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659628eddf20.png"
|
||||
},
|
||||
{
|
||||
"title": "颈椎训练:每个人都应该将其加入日常",
|
||||
"created": "2024-05-22 08:00",
|
||||
@ -1057,6 +1253,13 @@
|
||||
"author": "無名小栈",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/03/21/65fc59764c0be.png"
|
||||
},
|
||||
{
|
||||
"title": "0.22.0版本Memos API介绍",
|
||||
"created": "2024-05-19 23:40",
|
||||
"link": "https://byer.top/posts/b9ef7523.html",
|
||||
"author": "星の野",
|
||||
"avatar": "https://bu.dusays.com/2023/10/01/6519291503349.jpg"
|
||||
},
|
||||
{
|
||||
"title": "五月|焦虑,接受,进步",
|
||||
"created": "2024-05-19 22:23",
|
||||
@ -1064,6 +1267,13 @@
|
||||
"author": "AlenLiu",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/03/31/66097a6d9363f.png"
|
||||
},
|
||||
{
|
||||
"title": "Canvas 2D 进阶",
|
||||
"created": "2024-05-19 14:52",
|
||||
"link": "https://www.qcqx.cn/article/995d74ec.html",
|
||||
"author": "轻笑",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659628eddf20.png"
|
||||
},
|
||||
{
|
||||
"title": "【LSP】微型滚动动画库",
|
||||
"created": "2024-05-19 14:33",
|
||||
@ -1078,6 +1288,27 @@
|
||||
"author": "微霞",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116f0fe045d.png"
|
||||
},
|
||||
{
|
||||
"title": "使用Umami数据魔改about界面",
|
||||
"created": "2024-05-19 00:16",
|
||||
"link": "https://byer.top/posts/90d1e7f2.html",
|
||||
"author": "星の野",
|
||||
"avatar": "https://bu.dusays.com/2023/10/01/6519291503349.jpg"
|
||||
},
|
||||
{
|
||||
"title": "将Umami API的数据展现在博客中",
|
||||
"created": "2024-05-18 21:12",
|
||||
"link": "https://byer.top/posts/fa30aee5.html",
|
||||
"author": "星の野",
|
||||
"avatar": "https://bu.dusays.com/2023/10/01/6519291503349.jpg"
|
||||
},
|
||||
{
|
||||
"title": "Canvas 2D 基础",
|
||||
"created": "2024-05-18 20:53",
|
||||
"link": "https://www.qcqx.cn/article/8c1c45d8.html",
|
||||
"author": "轻笑",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659628eddf20.png"
|
||||
},
|
||||
{
|
||||
"title": "前端分享 - 滑动阻尼效果",
|
||||
"created": "2024-05-17 17:47",
|
||||
@ -1176,6 +1407,13 @@
|
||||
"author": "山岳库博",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116c3ba58c3.png"
|
||||
},
|
||||
{
|
||||
"title": "Twikoo表情",
|
||||
"created": "2024-05-09 14:44",
|
||||
"link": "https://blog.qjqq.cn/posts/829b.html",
|
||||
"author": "青桔气球",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/661241402f02a.png"
|
||||
},
|
||||
{
|
||||
"title": "树状数组",
|
||||
"created": "2024-05-08 16:40",
|
||||
@ -1190,6 +1428,13 @@
|
||||
"author": "一府",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/19/662145a134a68.png"
|
||||
},
|
||||
{
|
||||
"title": "基于rPPG的心率测算程序设计报告[公开版]",
|
||||
"created": "2024-05-06 20:23",
|
||||
"link": "https://tianli-blog.club/rppg/",
|
||||
"author": "Tianli",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116950412cc.png"
|
||||
},
|
||||
{
|
||||
"title": "饿殍:明末千里行-岁大饥,人相食",
|
||||
"created": "2024-05-05 14:10",
|
||||
@ -1232,6 +1477,13 @@
|
||||
"author": "葱苓sama",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/03/663458df4e6f0.png"
|
||||
},
|
||||
{
|
||||
"title": "添加来访者卡片",
|
||||
"created": "2024-04-30 09:56",
|
||||
"link": "https://blog.qjqq.cn/posts/834f.html",
|
||||
"author": "青桔气球",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/661241402f02a.png"
|
||||
},
|
||||
{
|
||||
"title": "Hexo搭建进阶:Vercel部署、主题安装、基础用法",
|
||||
"created": "2024-04-30 05:33",
|
||||
@ -1274,6 +1526,13 @@
|
||||
"author": "ChrisKim",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/06/27/667d880789765.webp"
|
||||
},
|
||||
{
|
||||
"title": "主题资源",
|
||||
"created": "2024-04-25 15:03",
|
||||
"link": "https://blog.qjqq.cn/posts/6468.html",
|
||||
"author": "青桔气球",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/661241402f02a.png"
|
||||
},
|
||||
{
|
||||
"title": "关于群聊更换的紧急通知",
|
||||
"created": "2024-04-24 21:42",
|
||||
@ -1281,6 +1540,13 @@
|
||||
"author": "Akilar",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/661170950f7a2.png"
|
||||
},
|
||||
{
|
||||
"title": "添加那年今日卡片",
|
||||
"created": "2024-04-24 09:40",
|
||||
"link": "https://blog.qjqq.cn/posts/155e.html",
|
||||
"author": "青桔气球",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/661241402f02a.png"
|
||||
},
|
||||
{
|
||||
"title": "2024-4-20:The bad weather in GuangDong but something wonderful in school",
|
||||
"created": "2024-04-21 19:21",
|
||||
@ -1309,6 +1575,13 @@
|
||||
"author": "ChrisKim",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/06/27/667d880789765.webp"
|
||||
},
|
||||
{
|
||||
"title": "Plane项目管理工具的私有化部署安装方法",
|
||||
"created": "2024-04-20 16:19",
|
||||
"link": "https://pipuwong.com/plane-self-hosted",
|
||||
"author": "皮普",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f1b29c34a.png"
|
||||
},
|
||||
{
|
||||
"title": "MySQL安装教程",
|
||||
"created": "2024-04-20 13:13",
|
||||
@ -1372,6 +1645,13 @@
|
||||
"author": "AlenLiu",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/03/31/66097a6d9363f.png"
|
||||
},
|
||||
{
|
||||
"title": "我和 ChatGPT4 把友情链接改成了“朋友圈“",
|
||||
"created": "2024-04-18 01:43",
|
||||
"link": "https://pipuwong.com/friend-link-to-moments",
|
||||
"author": "皮普",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f1b29c34a.png"
|
||||
},
|
||||
{
|
||||
"title": "多卡并行",
|
||||
"created": "2024-04-18 00:25",
|
||||
@ -1414,6 +1694,20 @@
|
||||
"author": "虹墨",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/05/31/6659668724466.png"
|
||||
},
|
||||
{
|
||||
"title": "WordPress后台被自动强制退出的解决办法 – Google Quicklink惹的祸",
|
||||
"created": "2024-04-13 23:37",
|
||||
"link": "https://pipuwong.com/solution-to-wordpress-backend-automatic-forced-logout",
|
||||
"author": "皮普",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f1b29c34a.png"
|
||||
},
|
||||
{
|
||||
"title": "PostChat--让你的网站提前步入AI时代",
|
||||
"created": "2024-04-12 14:03",
|
||||
"link": "https://tianli-blog.club/postchat/",
|
||||
"author": "Tianli",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116950412cc.png"
|
||||
},
|
||||
{
|
||||
"title": "Halo博客搭配Memos实现说说功能",
|
||||
"created": "2024-04-11 17:23",
|
||||
@ -1442,13 +1736,6 @@
|
||||
"author": "Akilar",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/661170950f7a2.png"
|
||||
},
|
||||
{
|
||||
"title": "Butterfly解决Gitalk密钥暴露的问题",
|
||||
"created": "2024-04-08 10:42",
|
||||
"link": "https://www.hitagi.icu/posts/17b458ca/",
|
||||
"author": "Hitagi",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/07/668a9e330dc6a.webp"
|
||||
},
|
||||
{
|
||||
"title": "关于 DailyHotApi 的重构",
|
||||
"created": "2024-04-08 08:00",
|
||||
@ -1456,6 +1743,13 @@
|
||||
"author": "無名小栈",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/03/21/65fc59764c0be.png"
|
||||
},
|
||||
{
|
||||
"title": "让你的个人网站支持 ios 添加到主屏幕全屏应用",
|
||||
"created": "2024-04-07 23:29",
|
||||
"link": "https://pipuwong.com/ios-webapp",
|
||||
"author": "皮普",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f1b29c34a.png"
|
||||
},
|
||||
{
|
||||
"title": "长安公园植物园碎片兼求助",
|
||||
"created": "2024-04-07 16:42",
|
||||
@ -1659,6 +1953,13 @@
|
||||
"author": "微霞",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116f0fe045d.png"
|
||||
},
|
||||
{
|
||||
"title": "说说",
|
||||
"created": "2024-02-14 02:23",
|
||||
"link": "https://blog.hesiy.cn/speak/",
|
||||
"author": "FloatSheep",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/28/66a6324891ba1.webp"
|
||||
},
|
||||
{
|
||||
"title": "世界,您好!",
|
||||
"created": "2024-02-08 11:18",
|
||||
@ -1729,6 +2030,20 @@
|
||||
"author": "Ariasaka",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/09/6614f40b65114.png"
|
||||
},
|
||||
{
|
||||
"title": "2023年度总结",
|
||||
"created": "2023-12-31 00:55",
|
||||
"link": "https://tianli-blog.club/2023%e5%b9%b4%e5%ba%a6%e6%80%bb%e7%bb%93/",
|
||||
"author": "Tianli",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116950412cc.png"
|
||||
},
|
||||
{
|
||||
"title": "域名被江苏省公益反诈拦截解决方案",
|
||||
"created": "2023-12-28 21:01",
|
||||
"link": "https://tianli-blog.club/%e5%9f%9f%e5%90%8d%e8%a2%ab%e6%b1%9f%e8%8b%8f%e7%9c%81%e5%85%ac%e7%9b%8a%e5%8f%8d%e8%af%88%e6%8b%a6%e6%88%aa%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/",
|
||||
"author": "Tianli",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116950412cc.png"
|
||||
},
|
||||
{
|
||||
"title": "新年倒计时改良&随便说说",
|
||||
"created": "2023-12-25 20:24",
|
||||
@ -1884,32 +2199,25 @@
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/661170950f7a2.png"
|
||||
},
|
||||
{
|
||||
"title": "那些年用过的CSS奇妙用法之能用CSS就不用JS技巧系列",
|
||||
"created": "2023-08-27 19:22",
|
||||
"link": "https://blog.anheyu.com/posts/340b.html",
|
||||
"author": "安知鱼",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66117080f2460.png"
|
||||
"title": "关于",
|
||||
"created": "2023-08-29 03:50",
|
||||
"link": "https://blog.hesiy.cn/about/",
|
||||
"author": "FloatSheep",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/28/66a6324891ba1.webp"
|
||||
},
|
||||
{
|
||||
"title": "什么是CDN?它解决了什么难题?国内CDN加Vercel,无服务器使用办法",
|
||||
"created": "2023-08-26 19:24",
|
||||
"link": "https://blog.anheyu.com/posts/136a.html",
|
||||
"author": "安知鱼",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66117080f2460.png"
|
||||
"title": "友链",
|
||||
"created": "2023-08-24 04:49",
|
||||
"link": "https://blog.hesiy.cn/friends/",
|
||||
"author": "FloatSheep",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/28/66a6324891ba1.webp"
|
||||
},
|
||||
{
|
||||
"title": "腾讯出品免费logo制作神器AI Logo,腾讯这次真的良心了",
|
||||
"created": "2023-08-19 18:42",
|
||||
"link": "https://blog.anheyu.com/posts/8105.html",
|
||||
"author": "安知鱼",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66117080f2460.png"
|
||||
},
|
||||
{
|
||||
"title": "当AI加上PS后让我变的极为振奋(附mac安装ps beta25.0)教程",
|
||||
"created": "2023-08-18 19:24",
|
||||
"link": "https://blog.anheyu.com/posts/4eb4.html",
|
||||
"author": "安知鱼",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66117080f2460.png"
|
||||
"title": "友链集装箱",
|
||||
"created": "2023-08-24 04:49",
|
||||
"link": "https://blog.hesiy.cn/container/",
|
||||
"author": "FloatSheep",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/07/28/66a6324891ba1.webp"
|
||||
},
|
||||
{
|
||||
"title": "Swpp Backends 官方文档",
|
||||
@ -1918,13 +2226,6 @@
|
||||
"author": "山岳库博",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66116c3ba58c3.png"
|
||||
},
|
||||
{
|
||||
"title": "CNAME解析至cf:分流解析cloudflare处理国外请求",
|
||||
"created": "2023-07-23 17:55",
|
||||
"link": "https://blog.anheyu.com/posts/40fd.html",
|
||||
"author": "安知鱼",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/06/66117080f2460.png"
|
||||
},
|
||||
{
|
||||
"title": "我的英文名",
|
||||
"created": "2023-06-29 21:46",
|
||||
@ -1973,6 +2274,41 @@
|
||||
"link": "https://blog.imoyan.top/posts/5f2e.html",
|
||||
"author": "陌颜Hao",
|
||||
"avatar": "https://bu.dusays.com/2024/03/15/65f3fd054c5db.jpg"
|
||||
},
|
||||
{
|
||||
"title": "利用插件系统,批量替换 Butterfly 主题的 CDN。",
|
||||
"created": "2022-05-17 20:00",
|
||||
"link": "https://android99.com/2022/05/17/butterfly-replace-cdn/",
|
||||
"author": "Android",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/66124120884cc.png"
|
||||
},
|
||||
{
|
||||
"title": "Maya 视口中颜色异常的解决方法",
|
||||
"created": "2021-12-27 14:00",
|
||||
"link": "https://android99.com/2021/12/27/maya-viewport-color-problem/",
|
||||
"author": "Android",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/66124120884cc.png"
|
||||
},
|
||||
{
|
||||
"title": "Butterfly主题 一图流背景与顶部图修改",
|
||||
"created": "2021-08-10 21:00",
|
||||
"link": "https://android99.com/2021/08/10/butterfly-top-image-modify/",
|
||||
"author": "Android",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/66124120884cc.png"
|
||||
},
|
||||
{
|
||||
"title": "关于Pjax与PWA冲突,导致地址栏异常的解决方法。",
|
||||
"created": "2020-12-18 16:00",
|
||||
"link": "https://android99.com/2020/12/18/pjax-and-pwa-conflict/",
|
||||
"author": "Android",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/66124120884cc.png"
|
||||
},
|
||||
{
|
||||
"title": "博客迁移至Hexo,并更名为矩阵。",
|
||||
"created": "2020-11-18 18:28",
|
||||
"link": "https://android99.com/2020/11/18/hello-hexo/",
|
||||
"author": "Android",
|
||||
"avatar": "https://cdn.qyliu.top/i/2024/04/07/66124120884cc.png"
|
||||
}
|
||||
]
|
||||
}
|
75
errors.json
75
errors.json
@ -1,92 +1,47 @@
|
||||
[
|
||||
[
|
||||
"Tianli",
|
||||
"https://tianli-blog.club/",
|
||||
"https://cdn.qyliu.top/i/2024/04/06/66116950412cc.png"
|
||||
],
|
||||
[
|
||||
"星の野",
|
||||
"https://byer.top/",
|
||||
"https://bu.dusays.com/2023/10/01/6519291503349.jpg"
|
||||
],
|
||||
[
|
||||
"阮一峰",
|
||||
"https://www.ruanyifeng.com/blog/",
|
||||
"https://cdn.qyliu.top/i/2024/04/29/662fbca75b9fe.png"
|
||||
],
|
||||
[
|
||||
"青桔气球",
|
||||
"https://blog.qjqq.cn/",
|
||||
"https://cdn.qyliu.top/i/2024/04/07/661241402f02a.png"
|
||||
],
|
||||
[
|
||||
"Android",
|
||||
"https://android99.com",
|
||||
"https://cdn.qyliu.top/i/2024/04/07/66124120884cc.png"
|
||||
],
|
||||
[
|
||||
"Redish",
|
||||
"https://blog.redish101.top/",
|
||||
"https://cdn.qyliu.top/i/2024/04/07/6612417f11b02.png"
|
||||
],
|
||||
[
|
||||
"Rootlex",
|
||||
"https://blog.nalex.top",
|
||||
"https://q2.qlogo.cn/headimg_dl?dst_uin=1736191951&spec=640"
|
||||
],
|
||||
[
|
||||
"皮普",
|
||||
"https://pipuwong.com",
|
||||
"https://cdn.qyliu.top/i/2024/04/09/6614f1b29c34a.png"
|
||||
],
|
||||
[
|
||||
"理随",
|
||||
"https://lisui.top/",
|
||||
"https://cdn.qyliu.top/i/2024/04/07/66123e6aac11c.png"
|
||||
],
|
||||
[
|
||||
"GuKaifeng",
|
||||
"https://gukaifeng.cn/",
|
||||
"https://cdn.qyliu.top/i/2024/04/09/6614ef03406cc.png"
|
||||
],
|
||||
[
|
||||
"Rootlex",
|
||||
"https://blog.nalex.top",
|
||||
"https://q2.qlogo.cn/headimg_dl?dst_uin=1736191951&spec=640"
|
||||
],
|
||||
[
|
||||
"听风小屋",
|
||||
"https://blog.ifeng.asia/",
|
||||
"https://cdn.qyliu.top/i/2024/03/31/6608e2697634c.png"
|
||||
],
|
||||
[
|
||||
"理随",
|
||||
"https://lisui.top/",
|
||||
"https://cdn.qyliu.top/i/2024/04/07/66123e6aac11c.png"
|
||||
],
|
||||
[
|
||||
"茗辰原",
|
||||
"https://mingcy.xyz/",
|
||||
"https://cdn.qyliu.top/i/2024/04/21/66249e0a775f8.png"
|
||||
],
|
||||
[
|
||||
"往日信笺",
|
||||
"https://www.xingmail.cn/",
|
||||
"https://cdn.qyliu.top/i/2024/04/14/661bf476a6d8d.png"
|
||||
],
|
||||
[
|
||||
"微生之最",
|
||||
"https://www.bbixb.top/",
|
||||
"https://cdn.qyliu.top/i/2024/05/04/66351f5b62b65.png"
|
||||
],
|
||||
[
|
||||
"轻笑",
|
||||
"https://www.qcqx.cn/",
|
||||
"https://cdn.qyliu.top/i/2024/05/31/6659628eddf20.png"
|
||||
],
|
||||
[
|
||||
"Dreamaker",
|
||||
"https://dreamakerr.cn/",
|
||||
"https://cdn.qyliu.top/i/2024/06/05/66604a6f8dba9.webp"
|
||||
],
|
||||
[
|
||||
"痕迹小站",
|
||||
"https://www.henjinet.com/",
|
||||
"https://cdn.qyliu.top/i/2024/05/31/6659688bbf14b.png"
|
||||
],
|
||||
[
|
||||
"云晓晨",
|
||||
"https://www.catchyxc.com/",
|
||||
"https://cdn.qyliu.top/i/2024/06/24/6678d81cb7eae.webp"
|
||||
],
|
||||
[
|
||||
"安知鱼",
|
||||
"https://blog.anheyu.com/",
|
||||
"https://cdn.qyliu.top/i/2024/04/06/66117080f2460.png"
|
||||
]
|
||||
]
|
6
grab.log
6
grab.log
@ -1,3 +1,3 @@
|
||||
2024-07-27 17:00:52,303 - INFO - 开始抓取文章...
|
||||
2024-07-27 17:00:52,306 - INFO - 正在从 https://blog.qyliu.top/friend.json 中获取,每个博客获取 5 篇文章
|
||||
2024-07-27 17:01:52,138 - INFO - 文章抓取成功
|
||||
2024-07-28 21:23:58,910 - INFO - 开始抓取文章...
|
||||
2024-07-28 21:23:58,914 - INFO - 正在从 https://blog.qyliu.top/friend.json 中获取,每个博客获取 5 篇文章
|
||||
2024-07-28 21:25:05,362 - INFO - 文章抓取成功
|
||||
|
13
readme.md
13
readme.md
@ -1,5 +1,7 @@
|
||||
---
|
||||
|
||||
<img align='right' src="./static/avatar.png" width="150" alt="fclite">
|
||||
|
||||
# Friend-Circle-Lite
|
||||
|
||||
[前端展示](https://fc.liushen.fun) | [详细文档](https://blog.qyliu.top/posts/4dc716ec/)
|
||||
@ -8,6 +10,12 @@
|
||||
|
||||
## 开发进度
|
||||
|
||||
### 2024-07-28
|
||||
|
||||
* 自部署添加跨域请求
|
||||
* 修复内存占用异常问题
|
||||
* 将html资源分开存放,实现更加美观的页面
|
||||
|
||||
### 2024-07-26
|
||||
|
||||
* 自部署添加跨域请求
|
||||
@ -15,11 +23,16 @@
|
||||
* 修复PJAX下会多次出现模态框的问题,并且切换页面不消失
|
||||
* 修复模态框宽度问题,添加日历图标以更加美观
|
||||
|
||||
<details>
|
||||
<summary>查看更多</summary>
|
||||
### 2024-07-25
|
||||
|
||||
* 自部署正在开发中,仅供测试
|
||||
* 添加`/errors.json`,用于获取丢失友链数据,提高自定义程度
|
||||
* 添加`/index.xml`接口的爬取,提高兼容性
|
||||
</details>
|
||||
|
||||
|
||||
|
||||
## 展示页面
|
||||
|
||||
|
80
server.py
80
server.py
@ -1,9 +1,11 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import JSONResponse, HTMLResponse
|
||||
from fastapi.responses import HTMLResponse, JSONResponse
|
||||
from starlette.middleware.cors import CORSMiddleware
|
||||
import schedule
|
||||
import time
|
||||
import logging
|
||||
import os
|
||||
import json
|
||||
import random
|
||||
from threading import Lock, Thread
|
||||
|
||||
@ -12,20 +14,22 @@ from friend_circle_lite.get_conf import load_config
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
# 添加 CORS 中间件
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
# 配置日志记录
|
||||
log_file = "grab.log"
|
||||
logging.basicConfig(filename=log_file, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
# 全局变量
|
||||
articles_data = {
|
||||
"statistical_data": {},
|
||||
"article_data": []
|
||||
}
|
||||
error_friends_info = []
|
||||
data_lock = Lock()
|
||||
|
||||
def fetch_articles():
|
||||
global articles_data, error_friends_info
|
||||
logging.info("开始抓取文章...")
|
||||
try:
|
||||
config = load_config("./conf.yaml")
|
||||
@ -35,10 +39,10 @@ def fetch_articles():
|
||||
logging.info(f"正在从 {json_url} 中获取,每个博客获取 {article_count} 篇文章")
|
||||
result, errors = fetch_and_process_data(json_url=json_url, count=article_count)
|
||||
sorted_result = sort_articles_by_time(result)
|
||||
with data_lock:
|
||||
articles_data["article_data"] = sorted_result["article_data"]
|
||||
articles_data["statistical_data"] = sorted_result["statistical_data"]
|
||||
error_friends_info = errors
|
||||
with open("all.json", "w", encoding="utf-8") as f:
|
||||
json.dump(sorted_result, f, ensure_ascii=False, indent=2)
|
||||
with open("errors.json", "w", encoding="utf-8") as f:
|
||||
json.dump(errors, f, ensure_ascii=False, indent=2)
|
||||
logging.info("文章抓取成功")
|
||||
else:
|
||||
logging.warning("抓取设置在配置中被禁用。")
|
||||
@ -47,43 +51,49 @@ def fetch_articles():
|
||||
|
||||
@app.get("/", response_class=HTMLResponse)
|
||||
async def root():
|
||||
html_content = """
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Friend Circle Lite</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>欢迎使用 Friend Circle Lite</h1>
|
||||
<p>这是一个轻量版友链朋友圈,有两种部署方式,其中自部署使用 fastAPI,还有 github action 部署方式,可以很方便的从友链中获取文章并展示到前端。</p>
|
||||
<ul>
|
||||
<li><a href="/all">查看所有文章,按照时间进行排序</a></li>
|
||||
<li><a href="/errors">查看出错数据,包含所有的错误友链信息,可自行发挥</a></li>
|
||||
<li><a href="/random">随机文章</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
return HTMLResponse(content=html_content)
|
||||
try:
|
||||
with open('./static/deploy-home.html', 'r', encoding='utf-8') as f:
|
||||
html_content = f.read()
|
||||
return HTMLResponse(content=html_content)
|
||||
except FileNotFoundError:
|
||||
return HTMLResponse(content="<h1>File not found</h1>", status_code=404)
|
||||
|
||||
@app.get('/all')
|
||||
async def get_all_articles():
|
||||
with data_lock:
|
||||
try:
|
||||
with open('all.json', 'r', encoding='utf-8') as f:
|
||||
articles_data = json.load(f)
|
||||
return JSONResponse(content=articles_data)
|
||||
except FileNotFoundError:
|
||||
return JSONResponse(content={"error": "File not found"}, status_code=404)
|
||||
except json.JSONDecodeError:
|
||||
return JSONResponse(content={"error": "Failed to decode JSON"}, status_code=500)
|
||||
|
||||
@app.get('/errors')
|
||||
async def get_error_friends():
|
||||
with data_lock:
|
||||
return JSONResponse(content=error_friends_info)
|
||||
try:
|
||||
with open('errors.json', 'r', encoding='utf-8') as f:
|
||||
errors_data = json.load(f)
|
||||
return JSONResponse(content=errors_data)
|
||||
except FileNotFoundError:
|
||||
return JSONResponse(content={"error": "File not found"}, status_code=404)
|
||||
except json.JSONDecodeError:
|
||||
return JSONResponse(content={"error": "Failed to decode JSON"}, status_code=500)
|
||||
|
||||
@app.get('/random')
|
||||
async def get_random_article():
|
||||
with data_lock:
|
||||
if articles_data["article_data"]:
|
||||
try:
|
||||
with open('all.json', 'r', encoding='utf-8') as f:
|
||||
articles_data = json.load(f)
|
||||
if articles_data.get("article_data"):
|
||||
random_article = random.choice(articles_data["article_data"])
|
||||
return JSONResponse(content=random_article)
|
||||
else:
|
||||
return JSONResponse(content={"error": "No articles available"}, status_code=404)
|
||||
except FileNotFoundError:
|
||||
return JSONResponse(content={"error": "File not found"}, status_code=404)
|
||||
except json.JSONDecodeError:
|
||||
return JSONResponse(content={"error": "Failed to decode JSON"}, status_code=500)
|
||||
|
||||
def schedule_tasks():
|
||||
schedule.every(4).hours.do(fetch_articles)
|
||||
|
BIN
static/avatar.png
Normal file
BIN
static/avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
65
static/deploy-home.html
Normal file
65
static/deploy-home.html
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user