A Python project that uses Truthbrush to scrape Donald J. Trump posts from Truth Social and runs sentiment analysis using FinBERT to determine potential market impact.
- Clone the repository:
git clone https://github.com/he-owen/TruthScraper.git
cd TruthScraper- Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Create a .env file in the project root with your Truth Social credentials:
TRUTHSOCIAL_USERNAME=your_username
TRUTHSOCIAL_PASSWORD=your_passwordRun the scraper and analyze sentiment:
python main.py <TRUTH_SOCIAL_URL> --max-posts 5Example:
python main.py https://truthsocial.com/@realDonaldTrump --max-posts 2Output
Found 2 new post(s):
[2025-11-07T00:02:10.748Z] (ID: 115505478418176575) | Sentiment: Bullish
I just held a great call between Prime Minister Benjamin Netanyahu...
--------------------------------------------------------------------------------
[2025-11-06T21:53:38.990Z] (ID: 115504973020459337) | Sentiment: Bullish
Joe Lombardo is the strong and very popular Governor of Nevada...
--------------------------------------------------------------------------------