From a3b5e5135641f55bf9c18d0935ac52a1d113efdd Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 29 Dec 2024 12:54:36 +0800 Subject: [PATCH] fix encoding --- app/modules/indexer/spider/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/indexer/spider/__init__.py b/app/modules/indexer/spider/__init__.py index 4c7017f7..b8b98dc3 100644 --- a/app/modules/indexer/spider/__init__.py +++ b/app/modules/indexer/spider/__init__.py @@ -732,7 +732,7 @@ class TorrentSpider: try: # 解析站点文本对象 if self.encoding: - html_doc = PyQuery(html_text.encode('utf-8')) + html_doc = PyQuery(html_text.encode(self.encoding)) else: html_doc = PyQuery(html_text) # 种子筛选器