diff --git a/README.md b/README.md index 78e813328900..9bb9866ef543 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,9 @@ 部署教程:[文档](https://fcircle-doc.yyyzyyyz.cn/) | [备用地址](https://fcircle-doc.is-a.dev/) ``` -5.0.4 支持: +5.0.5 支持: - 更好的前端样式 +- 极简模式 - 新增前端管理面板,告别繁琐的配置,管理朋友圈更加方便 - 支持 gitee 和 github 上的 issues 友链获取 - 支持butterfly、volantis、matery、sakura、fluid、nexmoe、Yun、stun、stellar、next主题的友链和文章获取 @@ -25,8 +26,7 @@ - 提供一个简单的快速部署脚本 最近改动: -- 前端管理面板docker缺失的环境变量修复 -- 对应前端管理面板更新版本检测功能,规范前端版本 -- 增加极简模式 +- 极简模式默认排序规则改为created +- stellar主题爬虫抓取规则优化 ``` diff --git a/api/main.py b/api/main.py index 8e5105641a4d..ef23cda289a9 100644 --- a/api/main.py +++ b/api/main.py @@ -49,7 +49,7 @@ def all(start: int = 0, end: int = -1, rule: str = "updated"): """返回数据库统计信息和文章信息列表 - start: 文章信息列表从 按rule排序后的顺序 的开始位置 - end: 文章信息列表从 按rule排序后的顺序 的结束位置 - - rule: 文章排序规则(创建时间/更新时间) + - rule: 文章排序规则(创建时间created/更新时间updated) """ list_ = ['title', 'created', 'updated', 'link', 'author', 'avatar'] return query_all(list_, start, end, rule) diff --git a/hexo_circle_of_friends/scrapy_conf.py b/hexo_circle_of_friends/scrapy_conf.py index 8a558de7045f..b9113c7b36c4 100644 --- a/hexo_circle_of_friends/scrapy_conf.py +++ b/hexo_circle_of_friends/scrapy_conf.py @@ -1,5 +1,5 @@ ############################## 除非您了解本项目,否则请勿修改本文件 ################################ -VERSION = "5.0.4" +VERSION = "5.0.5" # debug # debug模式 diff --git a/hexo_circle_of_friends/spiders/hexo_circle_of_friends.py b/hexo_circle_of_friends/spiders/hexo_circle_of_friends.py index 29d82ea53d8e..0ac11c970eef 100644 --- a/hexo_circle_of_friends/spiders/hexo_circle_of_friends.py +++ b/hexo_circle_of_friends/spiders/hexo_circle_of_friends.py @@ -353,9 +353,9 @@ def theme_stellar_parse(self, response): # print("theme_stellar_parse---------->" + response.url) rule = "stellar" friend = response.meta.get("friend") - titles = response.css(".post-list .post-title::text").extract() - partial_l = response.css(".post-list .post-card::attr(href)").extract() - createds = response.css("#post-meta time::attr(datetime)").extract() + titles = response.css(".post-list .post-card:not(.photo) .post-title::text").extract() + partial_l = response.css(".post-list .post-card:not(.photo)::attr(href)").extract() + createds = response.css(".post-list .post-card:not(.photo) #post-meta time::attr(datetime)").extract() updateds = [] try: for post_info in self.process_theme_postinfo(friend, partial_l, titles, createds, updateds, rule): diff --git a/hexo_circle_of_friends/utils/simple_mode_transform_json.py b/hexo_circle_of_friends/utils/simple_mode_transform_json.py index c8c585bfc88b..f2ea7a6dbbb9 100644 --- a/hexo_circle_of_friends/utils/simple_mode_transform_json.py +++ b/hexo_circle_of_friends/utils/simple_mode_transform_json.py @@ -13,7 +13,7 @@ def transform(): """ base_path = get_base_path() list_ = ['title', 'created', 'updated', 'link', 'author', 'avatar'] - data = sqlapi.query_all(list_) + data = sqlapi.query_all(list_, rule="created") with open(os.path.join(base_path, 'data.json'), "w") as f: json.dump(data, f) print(f"读取并转换完毕")