Skip to content

This is a public script demonstration repository, implemented using the TikHub.io interface.

License

Notifications You must be signed in to change notification settings

TikHub/TikHub-API-Demo

Repository files navigation

TikHub API Demo

This repository is a demonstration of how to use the TikHub.io API interface for downloading videos from platforms such as Douyin. Below are the steps for setting up the environment, obtaining the API key, and running the demo scripts.

1. Getting Started

Prerequisites

Installation

  1. Clone this repository:

    git clone https://github.com/your-repo/TikHub-API-Demo.git
    cd TikHub-API-Demo
  2. Create and activate a virtual environmen:

    python -m venv .venv
    source .venv/bin/activate  # Linux/MacOS
    .venv\Scripts\activate      # Windows
  3. Install the required dependencies:

    pip install -r requirements.txt

2. Obtaining the API Key

To interact with the TikHub API, you'll need an API Key. You can get it by signing up on TikHub.io and navigating to your API dashboard.

Once you have your API Key, create a .env file in the root directory of the project and add your key as follows:

API_KEY=your_private_api_key

⚠️ Make sure not to commit your .env file to version control. The .gitignore file in this repository already contains an entry to exclude .env files.

3. Editing the .env file

If the .env file does not exist or the API_KEY is not set properly, the program will create a default .env file for you with a placeholder. You can then edit this file and replace your_private_api_key with your actual API Key.

Example .env file

API_KEY=your_actual_api_key

4. Demo Scripts

This repository contains multiple example scripts

抖音(Douyin)

Douyin Single Video Downloader

Download a single video by providing its share URL. You can find the script in the following path: single_video_downloader.py

Douyin Profile Videos Downloader

Download multiple videos from a specific user profile. You can find the script in the following path: profile_videos_downloader.py

TikTok

TikTok Single Video Downloader

Download a single video by providing its share URL. You can find the script in the following path: single_video_downloader.py

TikTok Profile Videos Downloader

Download multiple videos from a specific user profile. You can find the script in the following path: profile_videos_downloader.py

Instagram

Instagram User Profile Data Online Viewer

View the user profile data by providing the username. You can find the script in the following path: instagram_user_info_app.py

🔎Click to see instagram_user_info_app.py screenshots

Input:

Output:

5. License

This project is licensed under the Apache License - see the LICENSE file for details.

About

This is a public script demonstration repository, implemented using the TikHub.io interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages