tiktok / README_WEB.md
Mohammed Foud
Add application file
d1a8e48

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

  1. Install the required dependencies:
pip install -r requirements.txt
  1. 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

  1. Open your web browser
  2. Go to: http://localhost:7860
  3. You'll see the modern web interface

Using the Bot

  1. Configure the Bot:

    • Enter the TikTok video URL
    • Add your comment text
    • Set the number of comments (1-1000)
  2. Start the Bot:

    • Click the "Start Bot" button
    • The bot will automatically log in and start posting comments
  3. Monitor Progress:

    • Watch the real-time progress bar
    • Check the statistics (successful/failed comments)
    • View the activity log for detailed information
  4. 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

  1. Port already in use:

    • Change the port in app.py or run_flask.py
    • Kill any existing processes on port 7860
  2. Chrome/ChromeDriver issues:

    • Make sure Chrome is installed
    • The bot will automatically download ChromeDriver
  3. Login issues:

    • Check your credentials in app.py
    • The bot will prompt for manual login if needed

Logs

  • Check the browser console for JavaScript errors
  • View the Flask application logs in the terminal
  • Check tiktok_bot.log for 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.html for UI changes
  • Modify app.py for backend logic
  • Update tiktok.py for bot functionality

The interface uses:

  • Flask for the web server
  • Flask-SocketIO for real-time communication
  • Tailwind CSS for styling
  • Vanilla JavaScript for interactivity