diff --git a/src/poller.py b/src/poller.py index 11c4db2..b99ee62 100644 --- a/src/poller.py +++ b/src/poller.py @@ -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