The Next Sight X.com AI Analyzer is a powerful tool designed to monitor harmful online behavior on X.com (formerly Twitter). It fetches tweets from a user-specified account, analyzes their content using advanced Natural Language Processing (NLP) techniques and keyword matching, and generates a professional PDF report.
- Fetch tweets from any public X.com profile.
- Analyze tweets for:
- Toxicity
- Hate Speech
- Cyberbullying
- Grooming
- Aggressive Behavior
- Terrorism
- Drugs
- Generate a professionally formatted PDF report:
- The first page contains a centered logo and report title.
- The second page onwards includes detailed findings.
- Graceful exit on
Ctrl+C
orCtrl+X
.
- Python 3.8 or higher.
- A stable internet connection.
Install the required libraries:
pip install fpdf requests transformers textblob
Ensure the following are in the project directory:
keywords.json
: Contains categories and associated keywords.assets/logo.jpg
: A logo file to include in the report.
- Clone the repository or download the script files.
- Create a
keywords.json
file with the structure (NOTE: The provided keywords.json file already has an extensive list, that you can extend even further):{ "cyberbullying": ["idiot", "stupid", "worthless"], "hate_speech": ["racist", "bigot", "hate"], "grooming": ["DM me", "let's meet", "secret"], "drugs": ["cocaine", "meth", "weed", "deal"], "terrorism": ["bomb", "ISIS", "attack", "jihad"], "aggressive_behavior": ["kill", "hurt", "destroy"] }
- Add the logo to the
assets/
folder aslogo.jpg
.
To fetch tweets from X.com, you need a Bearer Token from the X.com Developer platform. Follow these steps:
- Go to the Twitter Developer Portal.
- Log in with your X.com account credentials.
- If you don’t already have a developer account, follow the prompts to apply. Provide the required details.
- Navigate to the Dashboard.
- Click Create App or Create Project.
- Provide an app name and complete the setup process.
- Once the app is created, go to the Keys and Tokens section.
- Under Authentication Tokens, generate a Bearer Token.
- Copy the token and keep it secure.
Run the script from the command line:
python next_sight_analyzer.py
When prompted, enter your X.com Bearer Token:
🔑 Enter your X.com (Twitter) Bearer Token:
Enter the X.com profile URL you want to analyze:
🌐 Enter the X.com profile URL to analyze: https://twitter.com/exampleuser
The script will:
- Fetch tweets from the specified profile.
- Analyze the tweets for harmful behavior.
- Generate a PDF report in the
reports/
folder.
Locate the generated report in the reports/
folder. The filename will follow this format:
report_YYYYMMDD-HHMMSS.pdf
Next_Sight_AI_Analyzer/
│
├── next_sight_analyzer.py # Main script
├── README.md # Instructions and documentation
├── requirements.txt # Python dependencies
├── keywords.json # Keywords for analysis
├── assets/
│ └── logo.jpg # Logo for the report
└── reports/ # Generated PDF reports
-
Page 1: Cover Page
- Centered logo at the top.
- Report title: "Next Sight AI generated report for x.com account [username]" centered on the page.
-
Page 2 Onwards: Detailed Report
- Total tweets analyzed.
- Flagged tweets with:
- Category
- Content
- Toxicity Score
- Press
Ctrl+C
orCtrl+X
anytime to exit the script cleanly.
-
Error: "TTF Font file not found"
- Ensure the
assets/logo.jpg
exists in the correct directory.
- Ensure the
-
Error: "Failed to fetch tweets"
- Verify the profile URL is correct and public.
- Ensure your Bearer Token is valid.
-
KeyboardInterrupt
- If you accidentally exit with
Ctrl+C
, simply rerun the script.
- If you accidentally exit with
Next Sight
Website: www.next-sight.com
Email: info@next-sight.com
For more advanced investigation:
We specialize in OSINT, HUMINT, and comprehensive background checks. Contact us for worldwide investigations tailored to your specific needs.
Training Opportunities:
Want to learn how to conduct professional investigations using the latest tools and techniques? Ask about our customized training programs for individuals, organizations, and law enforcement.