From 5bf3a7d3e842979e8edaae354220374a69957df9 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 4 Aug 2023 17:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20subscribe.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/subscribe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/chain/subscribe.py b/app/chain/subscribe.py index 9c02cd0d..5232fac5 100644 --- a/app/chain/subscribe.py +++ b/app/chain/subscribe.py @@ -368,7 +368,7 @@ class SubscribeChain(ChainBase): domain = StringUtils.get_url_domain(indexer.get("domain")) torrents: List[TorrentInfo] = self.refresh_torrents(site=indexer) # 按pubdate降序排列 - torrents.sort(key=lambda x: x.pubdate, reverse=True) + torrents.sort(key=lambda x: x.pubdate or '', reverse=True) # 取前N条 torrents = torrents[:settings.CACHE_CONF.get('refresh')] if torrents: