mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-05 06:41:26 +08:00
fix: detect login pages before rust parsing
This commit is contained in:
@@ -366,11 +366,10 @@ def test_subtitle_site_spider_skips_empty_rows(monkeypatch):
|
||||
assert result[0]["title"] == "The.Capture.S01"
|
||||
|
||||
|
||||
def test_subtitle_site_spider_marks_login_page_as_error(monkeypatch):
|
||||
def test_subtitle_site_spider_marks_login_page_as_error():
|
||||
"""
|
||||
Python 字幕解析遇到登录页时应标记站点错误,避免误判为无字幕。
|
||||
"""
|
||||
monkeypatch.setattr(rust_accel, "parse_indexer_subtitles", lambda **_kwargs: None)
|
||||
html = """
|
||||
<html><head><title>1PTBA.COM :: 登录 - Powered by NexusPHP</title></head>
|
||||
<body>未登录! 错误: 该页面必须在登录后才能访问 你需要启用cookies才能登录</body></html>
|
||||
|
||||
Reference in New Issue
Block a user