wasymshykh / tiktok-downloader

0 stars 0 forks source link

How it works ?? #1

Open BuissonArdent opened 3 years ago

BuissonArdent commented 3 years ago

Hej there, i have created the "tiktok_db" in phpmyadmin, import the sql file, and so go to localhost/tik(my folder)/php/index.php

Some errors there ! And want a password and username, I set my tiktok account, and doesn't work ...

Can you explain me step by step how your application works and how to use it... Ty

wasymshykh commented 3 years ago

First of all, thank you for checking out.

Application is divided into three parts:

Since you are good with PHP part. You need to have following for running nodejs and python service:

Setup

  1. In terminal, cd into 'node-api' directory of the project.
  2. Run following command to install all the nodejs dependencies npm install
  3. cd into 'python-api' folder and create a virtual environment by following command On Linux/Mac OS: python3 -m venv env On Windows: py -m venv env
  4. Activate the virtual environment by following command On Linux/Mac OS: source env/bin/activate On Windows: .\env\Scripts\activate
  5. Install python libraries by following commands pip install gevent Flask-RESTful TikTokApi (if pip is not installed: https://packaging.python.org/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line)
  6. Edit 'python-api/app.py' file and remove proxy="YOUR_PROXY" argument from the function. Replace YOUR_TOKEN with s_v_web_id cookie content from tiktok website (first login to your tiktok account then follow these steps: https://i.imgur.com/4Eo9Vil.png)

At this point you are ready to run both python and node services. Run Servers

  1. In terminal, go to 'node-api' directory and run node app.js server will start at port 3000
  2. Open another terminal, go to python-api directory then activate virtual environment (setup step 4) and run: On Linux/MacOS: python3 app.py On Windows: py app.py Python server should start at port 5000

Database Go your application database, select for 'users' table and check the username and password for login. Select 'settings' table and edit 'setting_value' column where setting_name is "site_url" to your web server path (without tailing backslash) e.g. your value can be "localhost/tik(my folder)/php"

That's it. You can now login to application, search for hashtag/profile/video. Save the video or download it directly.

Feel free to let me know if you have any questions.