TikTok Bot Web Interface
A modern web interface for the TikTok bot with real-time progress tracking.
Features
- π¨ Modern UI with Tailwind CSS
- π Real-time progress bar
- π Live status updates
- π Activity log
- π― Easy configuration
- π One-click bot start/stop
Installation
- Install the required dependencies:
pip install -r requirements.txt
- Make sure you have Chrome/Chromium installed for Selenium.
Usage
Starting the Web Interface
Run the Flask application:
python run_flask.py
Or directly:
python app.py
Accessing the Interface
- Open your web browser
- Go to:
http://localhost:7860 - You'll see the modern web interface
Using the Bot
Configure the Bot:
- Enter the TikTok video URL
- Add your comment text
- Set the number of comments (1-1000)
Start the Bot:
- Click the "Start Bot" button
- The bot will automatically log in and start posting comments
Monitor Progress:
- Watch the real-time progress bar
- Check the statistics (successful/failed comments)
- View the activity log for detailed information
Stop the Bot:
- Click "Stop Bot" to halt the process
Configuration
The bot uses the same configuration as the original script:
- Email:
foudmohammed914@gmail.com - Password:
009988Ppooii@@@@
You can modify these in the app.py file.
Features
Real-time Progress Tracking
- Live progress bar showing completion percentage
- Success/failure counters
- Current comment display
- Activity log with timestamps
Modern UI
- Responsive design that works on all devices
- Dark theme with gradient backgrounds
- Smooth animations and transitions
- Intuitive user interface
WebSocket Communication
- Real-time updates without page refresh
- Instant status changes
- Live progress streaming
File Structure
tik/
βββ app.py # Flask application
βββ tiktok.py # Modified TikTok bot (no tqdm)
βββ templates/
β βββ index.html # Web interface
βββ run_flask.py # Simple runner script
βββ requirements.txt # Dependencies
βββ README_WEB.md # This file
Troubleshooting
Common Issues
Port already in use:
- Change the port in
app.pyorrun_flask.py - Kill any existing processes on port 7860
- Change the port in
Chrome/ChromeDriver issues:
- Make sure Chrome is installed
- The bot will automatically download ChromeDriver
Login issues:
- Check your credentials in
app.py - The bot will prompt for manual login if needed
- Check your credentials in
Logs
- Check the browser console for JavaScript errors
- View the Flask application logs in the terminal
- Check
tiktok_bot.logfor detailed bot activity
Security Notes
- The web interface is for local use only
- Don't expose this to the internet without proper security
- Consider adding authentication for production use
Development
To modify the interface:
- Edit
templates/index.htmlfor UI changes - Modify
app.pyfor backend logic - Update
tiktok.pyfor bot functionality
The interface uses:
- Flask for the web server
- Flask-SocketIO for real-time communication
- Tailwind CSS for styling
- Vanilla JavaScript for interactivity