GithubHelp home page GithubHelp logo

peimengc / douyin-tiktok-api-python-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tikhubio/tikhub-api-python-sdk

0.0 0.0 0.0 191 KB

High-performance asynchronous Douyin and TikTok unofficial API based on TikHub API.

Home Page: https://api.tikhub.io

License: Apache License 2.0

Python 100.00%

douyin-tiktok-api-python-sdk's Introduction

更新 - 2023年6月15日

简介

TikHub是抖音与TikTok非官方的RESTful API平台。

我们提供的API只能获取公开数据,即任何人都可以通过浏览器及APP等访问抖音,TikTok,小红书以获取它们。

如果您有任何建议或者需求,请联系我们,更多的功能正在开发中,敬请期待!


鉴权

接口文档中带有🔒的接口需要在请求头中携带Token才可调用。

调用这些接口会使用你账户中的剩余请求次数!


购买

Website(🚧ing): dash.tikhub.io

API Website: api.tikhub.io

Discord(💳support): https://discord.gg/kk23BGeYrJ

Github: https://github.com/TikHubIO

Email: [email protected]

WeChat/微信: Lqiu1003912_


公告

TikHub的API将使用免费加付费的形式运行。

登录后,通过签到可以随机获得50-100次API请求,每24小时可签到一次。

使用示例

查看test.py

  • 第一步: 安装
pip install tikhub
  • 第二步: 初始化
from tikhub import TikTokAPI, DouyinAPI

token = "请在此填写您的token/秘钥"
tiktok_api = TikTokAPI(token)
douyin_api = DouyinAPI(token)
  • 第三步: 调用方法
import asyncio
    
from tikhub import TikTokAPI, DouyinAPI

if __name__ == '__main__':
    token ="请在此填写您的token/秘钥"

    tiktok_api = TikTokAPI(token)
    douyin_api = DouyinAPI(token)

    tiktok_video_url = "https://www.tiktok.com/@evil0ctal/video/7201344014984006954"

    r = None

    # 读取用户信息/Read user information
    r = asyncio.run(tiktok_api.get_user_info())
    print(r)

    tiktok_video_url = 'https://www.tiktok.com/@evil0ctal/video/7156033831819037994'
    tiktok_music_url = 'https://www.tiktok.com/music/original-sound-7128362040359488261'

    # 解析单一tiktok视频/Parse a single tiktok video
    # r = asyncio.run(tiktok_api.get_tiktok_video_data(tiktok_video_url))
    # print(r)

douyin-tiktok-api-python-sdk's People

Contributors

github-actions[bot] avatar evil0ctal avatar callmeiks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.