fix: install google news decoder

This commit is contained in:
hajimi
2026-08-04 01:10:22 +08:00
parent edce4baa09
commit 8aecf2fe7d
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -2,6 +2,7 @@
# HTTP 请求
aiohttp>=3.9.0
requests>=2.31.0
googlenewsdecoder>=0.1.7
httpx>=0.27.0
curl_cffi>=0.7.0 # TLS 指纹模拟 (绕过 JA3 检测)
@@ -39,6 +39,10 @@ class NewsCollectionRegressionTest(unittest.TestCase):
source = self.read(name)
self.assertIn("allow_summary=True", source, name)
def test_crawler_installs_google_news_decoder(self):
requirements = (CRAWLER / "requirements.txt").read_text(encoding="utf-8")
self.assertRegex(requirements, r"(?m)^googlenewsdecoder(?:[<>=!~].*)?$")
if __name__ == "__main__":
unittest.main()