Use custom Firefox user agent to avoid Cloudflare blocking
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m58s

Monkey-patch truthbrush.api.USER_AGENT with Firefox 147 UA string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 02:37:25 -05:00
parent fdf1180722
commit 5857d3e972

View File

@@ -7,8 +7,14 @@ import tempfile
import time
from typing import Optional
import truthbrush.api
from truthbrush import Api
# Override the default user agent to avoid Cloudflare blocking
truthbrush.api.USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"
)
from .database import init_db, is_post_seen, mark_post_seen
from .discord import send_post_to_discord
from .media import process_media