Skip to content

Commit

Permalink
修复butterfly的时间获取
Browse files Browse the repository at this point in the history
release 4.2.4
  • Loading branch information
hiltay committed Feb 10, 2022
1 parent 4e5c1b1 commit c0ccbeb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

⭐从4.1.3版本开始,一定要在配置项中配置友链页的获取策略
```
目前 release 4.2.3 版本:
目前 release 4.2.4 版本:
- 支持 gitee 和 github 上的 issuse 友链获取
- 支持butterfly、volantis、matery、sakura、fluid、nexmoe、Yun、stun、stellar主题的友链和文章获取
- 支持feed订阅规则,如atom、rss等规则(支持wordpress类型的博客)
Expand Down Expand Up @@ -34,5 +34,6 @@ bug修复:
- 文章超出当前时间的判断,逻辑优化与代码格式化
- 移除bs4依赖
- 移除旧订阅规则解析
- 修复butterfly的时间获取
```

2 changes: 1 addition & 1 deletion hexo_circle_of_friends/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

##############################除非您了解本项目,否则请勿修改以下内容################################

VERSION = "4.2.3"
VERSION = "4.2.4"

# debug
# debug模式
Expand Down
10 changes: 5 additions & 5 deletions hexo_circle_of_friends/spiders/hexo_circle_of_friends.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from hexo_circle_of_friends.utils.process_time import format_time
# from hexo_circle_of_friends import items todo use items

# post_parsers = []
# post_parsers = ["theme_butterfly_parse"]
post_parsers = [
"post_feed_parse", "theme_butterfly_parse", "theme_fluid_parse", "theme_matery_parse", "theme_sakura_parse",
"theme_volantis_parse", "theme_nexmoe_parse", "theme_next_parse", "theme_stun_parse", "theme_stellar_parse",
Expand Down Expand Up @@ -220,10 +220,10 @@ def post_feed_parse(self, response):
def theme_butterfly_parse(self, response):
# print("theme_butterfly_parse---------->" + response.url)
friend = response.meta.get("friend")
titles = response.css("#recent-posts .recent-post-info>a::text").extract()
partial_l = response.css("#recent-posts .recent-post-info>a::attr(href)").extract()
createds = response.css("#recent-posts .recent-post-info .post-meta-date-created::text").extract()
updateds = response.css("#recent-posts .recent-post-info .post-meta-date-updated::text").extract()
titles = response.css("#recent-posts .recent-post-info a:first-child::text").extract()
partial_l = response.css("#recent-posts .recent-post-info a:first-child::attr(href)").extract()
createds = response.css("#recent-posts .recent-post-info .post-meta-date time:first-of-type::text").extract()
updateds = response.css("#recent-posts .recent-post-info .post-meta-date time:nth-of-type(2)::text").extract()
try:
l = len(partial_l) if len(partial_l) < 5 else 5
titles = self.process_title(titles, l)
Expand Down

0 comments on commit c0ccbeb

Please sign in to comment.