fix: use browser User-Agent for RSS feeds blocked by InfoQ

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-03 16:38:48 +08:00
parent 37931d2ef5
commit f6fac7b642
2 changed files with 10 additions and 3 deletions

View File

@@ -23,6 +23,12 @@ def test_parse_sample_rss_fixture():
assert "minimal RSS item" in items[0]["summary"]
def test_rss_user_agent_avoids_bot_blocked_feeds():
from daily.news.fetch import RSS_USER_AGENT
assert "daily-robots" not in RSS_USER_AGENT
def test_fetch_ai_news_offline(monkeypatch):
from daily.news import fetch as news_fetch