Giter VIP home page Giter VIP logo

tiktok's Introduction

TikTok API Reverse Engineering

Initial commit as old code is deprecated because urls now require anti-spam parameters and signatures.

Instructions

How to install

git clone https://github.com/dobizz/TikTok.git
cd TikTok
pip3 install -r requirements.txt

How to run

Execute run.py, chromedriver will be automatically downloaded. Downloaded video files will be placed in ./videos/[username]

python3 run.py

Requirements

Selenium

Learn more about Selenium here https://pypi.org/project/selenium/

pip3 install selenium

Chrome Driver

Download ChromeDriver here https://chromedriver.chromium.org/downloads

You will need to redownload ChromeDriver if your installed version of chrome is newer than the provided version.

Code Structure

api.py

class TikTok:
    def __init__(self, path: str):
        pass
        
    def _signURL(self, url) -> str:
        pass
        
    def getUserDetails(self, username) -> dict():
        pass
    
    def getTrending(self, count: int) -> list(): 
        pass
        
    def getUserTikToks(self, userid, count: int) -> list():
        pass

robots.py

def getAllowedAgents() -> list():
    pass

Work In Progress

Features

  • Integrate Selenium/Chrome Webdriver
  • Partial concurrency
  • Function: _signURL(url:str) -> str
  • Function: getUserDetails(username:str) -> dict()
  • Function: getTrending(count: int) -> list(dict())
  • Function: getUserTiktoks(id:int, count:int) -> list(dict())
  • Complete all API functions
  • Add rotating proxies
  • Profile crawler
  • Trend crawler
  • Full concurrency

Files

  • api.py - TikTok API
  • robots.py - Reads User-Agents from https://www.tiktok.com/robots.txt
  • run.py
  • utils.py - Utilities for downloading and updating ChromeDriver
  • proxies.py - Module for proxies and IP addresses

Donate BTC

Find my code helpful? Some Satoshis would be nice. Thanks :)

1zdraxHPQfZ8wvpMXt2VYhnGwmkLCf7UL

tiktok's People

Contributors

dobizz avatar

Watchers

James Cloos 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.