Coder Social home page Coder Social logo

dalalsunil1986 / tiktokapi-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avilash/tiktokapi-python

0.0 0.0 0.0 69 KB

TikTok API Python Wrapper

Home Page: https://avilash.github.io/TikTokAPI-Python/

License: MIT License

Python 99.78% HTML 0.22%

tiktokapi-python's Introduction

Unofficial TikTok API Wrapper in Python

This is an unofficial TikTok Api python wrapper. I have an App using this API, and thus will constantly keep updating this wrapper
This implementation is inspired by TikTokApi, but runs faster.

Table of Contents

Getting Started

To get started using this API, follow the instructions below.

Installing

Pip

pip install PyTikTokAPI

Install from source

git clone https://github.com/avilash/TikTokAPI-Python.git
python setup.py install

Quick Start Guide

Import

from TikTokAPI import TikTokAPI

Get the most trending Videos on TikTok

api = TikTokAPI()
retval = api.getTrending(count=5)

Get a user by name

api = TikTokAPI()
user_obj = api.getUserByName("fcbarcelona")

Get videos of a user

api = TikTokAPI()
user_videos = api.getVideosByUserName("fcbarcelona")

Get likes of a user

api = TikTokAPI()
user_videos = api.getLikesByUserName("fcbarcelona")

Detailed Documentation

This section contains details about the parameters of each function and what it returns

Methods

Tiktok Class

Inputs

  • language - Self explanatory
  • region - Self explanatory
  • cookie - The TikTok Cookie containing the parameter s_v_web_id. If not provided, the parameter will be generated.
__init__(self, language='en', region='IN', cookie=None)

Get Trending Videos

Inputs

  • count - Number of videos to fetch
getTrending(self, count=30)

Get User

Inputs

  • user_name - Username, eg - fcbarcelona
getUserByName(self, user_name)

Get Videos By Username

Inputs

  • user_name - Username, eg - fcbarcelona
  • count - Number of videos to fetch
getVideosByUserName(self, user_name, count=30)

Get Likes By Username

Inputs

  • user_name - Username, eg - fcbarcelona
  • count - Number of videos to fetch
getLikesByUserName(self, user_name, count=30)

Get Hashtag

Inputs

  • hashTag - HashTag, eg - #fcbarcelona
getHashTag(self, hashTag)

Get Videos By Hashtag

Inputs

  • hashTag - HashTag, eg - #fcbarcelona
  • count - Number of videos to fetch
getVideosByHashTag(self, hashTag, count=30)

Get Music

Inputs

  • music_id - Music Id, eg - 6704854531001289474
getMusic(self, music_id)

Get Videos By Music

Inputs

  • music_id - Music Id, eg - 6704854531001289474
  • count - Number of videos to fetch
getVideosByMusic(self, music_id, count=30)

Get Video By Id

Inputs

  • video_id - Video Id, eg - 6843481669886954757
getVideoById(self, video_id)

Download Video

Inputs

  • video_id - Video Id, eg - 6843481669886954757
  • save_path - Path where the downloaded video should be saved
downloadVideoById(self, video_id, save_path)

Download Video No Watermark

Inputs

  • video_id - Video Id, eg - 6843481669886954757
  • save_path - Path where the downloaded video should be saved
downloadVideoByIdNoWatermark(self, video_id, save_path)

Built With

Authors

License

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

tiktokapi-python's People

Contributors

avilash 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.