2024-07-02 10:30:10 +08:00

228 lines
12 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"正在检查 清羽飞扬 的博客 https://blog.qyliu.top/\n",
"正在检查 张洪Heo 的博客 https://blog.zhheo.com/\n",
"正在检查 Leonus 的博客 https://blog.leonus.cn/\n",
"正在检查 杜老师说 的博客 https://dusays.com\n",
"一府 的博客 https://blog.duolaa.asia/ 无法访问\n",
"正在检查 贰猹 的博客 https://noionion.top/\n",
"正在检查 ChrisKim 的博客 https://www.zouht.com/\n",
"正在检查 無名小栈 的博客 https://blog.imsyy.top/\n",
"正在检查 满心记 的博客 https://blog.lovelu.top/\n",
"正在检查 Tianli 的博客 https://tianli-blog.club/\n",
"不可链接的FEED地址https://blog.imsyy.top/atom.xml: HTTPSConnectionPool(host='blog.imsyy.top', port=443): Max retries exceeded with url: /404 (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))\n",
"正在检查 Akilar 的博客 https://akilar.top/\n",
"正在检查 星港Star 的博客 https://blog.starsharbor.com\n",
"清风 的博客 https://luckqf.cn 无法访问\n",
"dreamChaser 的博客 https://blog.wenjing.xin/ 无法访问\n",
"正在检查 百里飞洋 的博客 https://blog.meta-code.top/\n",
"正在检查 揽星 的博客 https://lanxing.net/\n",
"正在检查 Android 的博客 https://android99.com\n",
"正在检查 阮一峰 的博客 https://www.ruanyifeng.com/blog/\n",
"正在检查 星辰日记 的博客 https://blog.xsot.cn/\n",
"正在检查 星の野 的博客 https://byer.top/\n",
"正在检查 June 的博客 https://blog.june-pj.cn/\n",
"正在检查 幻雪博客 的博客 https://huanxueblog.top/\n",
"正在检查 风记星辰 的博客 https://www.thyuu.com\n",
"正在检查 呓语梦轩 的博客 https://blog.awaae001.top\n",
"正在检查 青桔气球 的博客 https://blog.qjqq.cn/\n",
"AlenLiu 的博客 https://blog.alenliu.space/ 无法访问\n",
"正在检查 山岳库博 的博客 https://kmar.top/\n",
"JackieZhu 的博客 https://blog.zhfan.top/ 无法访问\n",
"正在检查 微霞 的博客 https://yuuu.org\n",
"Redish 的博客 https://blog.redish101.top/ 无法访问\n",
"Rootlex 的博客 https://blog.nalex.top 无法访问\n",
"GuKaifeng 的博客 https://gukaifeng.cn/ 无法访问\n",
"正在检查 乙未博客 的博客 https://www.yvii.cn\n",
"正在检查 东评西就 的博客 https://dongjunke.cn\n",
"正在检查 Fgaoxing 的博客 https://www.yt-blog.top/\n",
"正在检查 鹊楠 的博客 https://www.quenan.love\n",
"正在检查 Ariasaka 的博客 https://blog.yaria.top/\n",
"理随 的博客 https://lisui.top/ 无法访问\n",
"听风小屋 的博客 https://blog.ifeng.asia/ 无法访问\n",
"正在检查 半方池水 的博客 https://uuanqin.top/\n",
"正在检查 往日信笺 的博客 https://www.xingmail.cn/\n",
"正在检查 皮普 的博客 https://pipuwong.com\n",
"正在检查 luo 的博客 https://www.bokelhc.cn\n",
"正在检查 星空故事 的博客 https://blog.sinzmise.top/\n",
"正在检查 刘郎阁 的博客 https://yjvc.cn/index.php/\n",
"正在检查 obaby 的博客 https://h4ck.org.cn/\n",
"正在检查 湘铭 的博客 https://xiangming.site/\n",
"正在检查 爱吃肉的猫 的博客 https://meuicat.com/\n",
"青竹小轩 的博客 https://gyhwd.top/ 无法访问\n",
"正在检查 星辰 的博客 https://blog.6ing.top/\n",
"正在检查 辞琼 的博客 https://blog.wsq127.top/\n",
"正在检查 Efu 的博客 https://www.efu.me/\n",
"正在检查 茗辰原 的博客 https://mingcy.xyz/\n",
"正在检查 葱苓sama 的博客 https://blog.ciraos.top/\n",
"Fiveth 的博客 https://blog.fiveth.cc/ 无法访问\n",
"正在检查 HiPeach 的博客 https://blog.opeach.cn\n",
"微笔记 的博客 https://flytusky.top 无法访问\n",
"正在检查 微生之最 的博客 https://www.bbixb.top/\n",
"正在检查 蛋蛋困了 的博客 https://blog.wzwzx.cn/\n",
"正在检查 凉心 的博客 https://www.lxink.cn/\n",
"正在检查 陌颜Hao 的博客 https://blog.imoyan.top/\n",
"正在检查 M.Talen 的博客 https://blog.talen.top/\n",
"正在检查 轻笑 的博客 https://www.qcqx.cn/\n",
"正在检查 虹墨 的博客 https://www.imaegoo.com/\n",
"正在检查 痕迹小站 的博客 https://www.henjinet.com/\n",
"Dreamaker 的博客 http://dreamakerr.cn/ 无法访问\n",
"正在检查 纸鹿本鹿 的博客 https://blog.zhilu.cyou\n",
"SerMs 的博客 https://blog.serms.top/ 无法访问\n",
"正在检查 XINGYE 的博客 https://blog.xing-ye.top/\n",
"GanSer 的博客 https://www.gan1ser.top/ 无法访问\n",
"正在检查 六月是只猫 的博客 https://www.lyszm.com/\n",
"正在检查 凌云 的博客 https://www.linyunlink.top/\n",
"ZHI-BLOG 的博客 https://blog.zhwei.tech/ 无法访问\n",
"正在检查 BUZZ 的博客 https://blog.buzzchat.top/\n",
"正在检查 云晓晨 的博客 https://www.catchyxc.com/\n",
"安知鱼 的博客 https://blog.anheyu.com/ 无法访问\n",
"正在检查 唐志远 的博客 https://fe32.top/\n",
"数据处理完成\n",
"总共有 77 位朋友,其中 59 位博客可访问18 位博客无法访问\n"
]
}
],
"source": [
"# 引入 check_feed 和 parse_feed 函数\n",
"from friend_circle_lite.get_info import fetch_and_process_data\n",
"import json\n",
"\n",
"result = fetch_and_process_data(\"https://blog.qyliu.top/friend.json\")\n",
"\n",
"# 将结果保存为 JSON 文件\n",
"with open(\"result.json\", \"w\", encoding=\"utf-8\") as f:\n",
" json.dump(result, f, ensure_ascii=False, indent=2)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['atom', 'https://www.linyunlink.top/atom.xml']\n",
"不可链接的FEED地址['atom', 'https://www.linyunlink.top/atom.xml']: No connection adapters were found for \"['atom', 'https://www.linyunlink.top/atom.xml']\"\n",
"{'website_name': '', 'author': '', 'link': '', 'articles': []}\n"
]
}
],
"source": [
"from friend_circle_lite.get_info import check_feed, parse_feed\n",
"\n",
"url = check_feed(\"https://www.linyunlink.top/\")\n",
"print(url)\n",
"feed = parse_feed(url)\n",
"print(feed)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from friend_circle_lite.get_info import sort_articles_by_time\n",
"\n",
"sorted_result = sort_articles_by_time(result)\n",
"\n",
"# 将结果保存为 JSON 文件\n",
"with open(\"result.json\", \"w\", encoding=\"utf-8\") as f:\n",
" json.dump(sorted_result, f, ensure_ascii=False, indent=2)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'website_name': '张洪Heo', 'author': '', 'link': 'https://blog.zhheo.com/', 'articles': [{'title': '新配了一个专门玩英雄联盟的台式机主机,分享下配置和过程', 'author': '', 'link': 'https://blog.zhheo.com/p/9a18f6bb.html', 'published': '2024-06-20 01:55', 'summary': '<p>我只玩英雄联盟这一个网游之前一直在用我淘汰下来的MacBook Pro 2019 intel i7', 'content': '<p>我只玩英雄联盟这一个网游之前一直在用我淘汰下来的MacBook Pro 2019 intel i7'}, {'title': '解决iOS邮箱使用QQ邮箱账户无法发送邮件连接发信服务器失败问题', 'author': '', 'link': 'https://blog.zhheo.com/p/cb3f5ed0.html', 'published': '2024-06-20 01:53', 'summary': '<p>我最近从qq邮箱换到了iOS自带的邮件客户端一方面是因为自从qq邮箱出了会员之后一堆广告一方面就是iOS18将支持邮件筛选我也想用用。但是使用QQ邮箱连接会有一些问题。</p>\\n<p>一方面是需要授权码验证这个大家都比较清楚登录的密码不是你的qq密码而是qq邮箱', 'content': '<p>我最近从qq邮箱换到了iOS自带的邮件客户端一方面是因为自从qq邮箱出了会员之后一堆广告一方面就是iOS18将支持邮件筛选我也想用用。但是使用QQ邮箱连接会有一些问题。</p>\\n<p>一方面是需要授权码验证这个大家都比较清楚登录的密码不是你的qq密码而是qq邮箱'}, {'title': '要排除的文件已经被上传到远程Git仓库怎么办', 'author': '', 'link': 'https://blog.zhheo.com/p/faf797ab.html', 'published': '2024-06-19 09:43', 'summary': '<p>mac有个毒瘤文件就是DS_Store如果没有全局排除掉那么上传新项目的时候很容易就被上传。还有一些其他的构建文件如果没有设置好<code>.gitignore</code>也会被上传。</p>\\n<p>有的时候排除文件在我们项目过一段时间后才想起来添加,但是那时候远程库已', 'content': '<p>mac有个毒瘤文件就是DS_Store如果没有全局排除掉那么上传新项目的时候很容易就被上传。还有一些其他的构建文件如果没有设置好<code>.gitignore</code>也会被上传。</p>\\n<p>有的时候排除文件在我们项目过一段时间后才想起来添加,但是那时候远程库已'}, {'title': 'Mac安装java17openjdk@17支持M系列芯片和intel芯片', 'author': '', 'link': 'https://blog.zhheo.com/p/6243d392.html', 'published': '2024-06-17 02:46', 'summary': '<p>因为入坑Halo插件开发装环境研究了一个多小时。主要是错误的安装了版本。Halo的java版本要求是17这个教程介绍安装java17通过homebrew来进行安装然后添加链接即可。</p>\\n<h2 id=\"安装homebrew\"><a', 'content': '<p>因为入坑Halo插件开发装环境研究了一个多小时。主要是错误的安装了版本。Halo的java版本要求是17这个教程介绍安装java17通过homebrew来进行安装然后添加链接即可。</p>\\n<h2 id=\"安装homebrew\"><a'}, {'title': '是时候去体验下 Apple Vision Pro 了', 'author': '', 'link': 'https://blog.zhheo.com/p/802d5b6b.html', 'published': '2024-06-14 08:19', 'summary': '<p>Vision Pro 已经支持了中国大陆销售售价29999。当然这不是重点主要Vision', 'content': '<p>Vision Pro 已经支持了中国大陆销售售价29999。当然这不是重点主要Vision'}]}\n"
]
}
],
"source": [
"from friend_circle_lite.get_info import fetch_and_process_data, check_feed, parse_feed\n",
"\n",
"print(parse_feed(check_feed(\"https://blog.zhheo.com/\")[-1]))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"python-dateutil 版本: 2.8.2\n",
"requests 版本: 2.31.0\n",
"feedparser 版本: 6.0.11\n"
]
}
],
"source": [
"import datetime\n",
"import dateutil\n",
"import requests\n",
"import feedparser\n",
"\n",
"# 打印 datetime 包的版本\n",
"\n",
"# 打印 python-dateutil 包的版本\n",
"print(f\"python-dateutil 版本: {dateutil.__version__}\")\n",
"\n",
"# 打印 requests 包的版本\n",
"print(f\"requests 版本: {requests.__version__}\")\n",
"\n",
"# 打印 feedparser 包的版本\n",
"print(f\"feedparser 版本: {feedparser.__version__}\")\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "base",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}