Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krypton-byte/tiktok-downloader
Tiktok Downloader/Scraper using requests & bs4
https://github.com/krypton-byte/tiktok-downloader
asynchronous asyncio beautifulsoup bs4 crawler downloader flask krypton-byte lightweight nowm python python3 requests tiktok watermark web without
Last synced: 2 days ago
JSON representation
Tiktok Downloader/Scraper using requests & bs4
- Host: GitHub
- URL: https://github.com/krypton-byte/tiktok-downloader
- Owner: krypton-byte
- License: gpl-3.0
- Created: 2021-04-08T04:57:33.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-27T18:46:09.000Z (7 months ago)
- Last Synced: 2025-01-12T21:05:24.515Z (9 days ago)
- Topics: asynchronous, asyncio, beautifulsoup, bs4, crawler, downloader, flask, krypton-byte, lightweight, nowm, python, python3, requests, tiktok, watermark, web, without
- Language: Python
- Homepage: https://tiktok-dl.id
- Size: 2.65 MB
- Stars: 319
- Watchers: 10
- Forks: 84
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
[![Unittest](https://github.com/krypton-byte/tiktok-downloader/actions/workflows/unittest.yml/badge.svg)](https://github.com/krypton-byte/tiktok-downloader/actions/workflows/unittest.yml)
[![Upload to PyPi](https://github.com/krypton-byte/tiktok-downloader/actions/workflows/python-publish.yml/badge.svg?branch=0.1.7&event=release)](https://github.com/krypton-byte/tiktok-downloader/actions/workflows/python-publish.yml)
[![Downloads](https://static.pepy.tech/personalized-badge/tiktok-downloader?period=total&units=none&left_color=black&right_color=orange&left_text=Downloads)](https://pepy.tech/project/tiktok-downloader)
[![viitor](https://visitor-badge.glitch.me/badge?page_id=krypton-byte.tiktok-downloader)]()# install
```bash
> python3 -m pip install tiktok_downloader
> python3 -m pip install git+https://github.com/krypton-byte/tiktok-downloader
```# Library
Tikmate
```python
>>> from tiktok_downloader import Tikmate
>>> d=Tikmate("url")
[<[type: "video" watermark: False]>, <[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```Snaptik
```python
>>> from tiktok_downloader import snaptik
>>> d=snaptik('https://vt.tiktok.com/xxxxxx/')
>>> d
[<[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```Musically Down
```python
>>> from tiktok_downloader import mdown
>>> d=mdown('https://vt.tiktok.com/xxxxxx/')
>>> d
[<[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```Tikdown
```python
>>> from tiktok_downloader import tikdown
>>> d=tikdown('https://vt.tiktok.com/xxxxxx/')
>>> d
[<[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```TTDownloader
```python
>>> from tiktok_downloader import ttdownloader
>>> d=ttdownloader('https://vt.tiktok.com/xxxxxx/')
>>> d
[<[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```Tikwm
```python
>>> from tiktok_downloader import tikwm
>>> d=tikwm('https://vt.tiktok.com/xxxxxx/')
>>> d
[<[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```Tiktok
```python
>>> from tiktok_downloader import VideoInfo
>>> d=VideoInfo.service('https://vt.tiktok.com/xxxxxx/')
>>> d
[<[type: "video" watermark: False]>]
>>> d[0].download('video.mp4')
```Get Info
```python
>>> from tiktok_downloader import VideoInfo
>>> VideoInfo.get_info('https://vt.tiktok.com/xxxxxx/')
```# Command line
```
usage: python3 -m tiktok_downloader [-h] [--snaptik | --ssstik | --tikmate | --mdown | --ttdownloader | --tikwm | --tikdown | --tiktok] [--host HOST] [--debug] [--port PORT] (--server | --url URL) [--info] [--json | --save SAVE]Tiktok Downloader [CLI]
options:
-h, --help show this help message and exitList Of Services:
--snaptik
--ssstik
--tikmate
--mdown
--ttdownloader
--tikdown
--tikwm
--tiktokWeb Configuration:
--host HOST Set host to run this web
--debug Set flask mode to debug
--port PORT Set portMode:
--server Run as web application
--url URL Video URLOptional:
--info Print info video like author, id & etcOutput Type:
--json Print result to json format
--save SAVE Write the result to file
```
## Example CLIDownload
```bash
$ python3 -m tiktok_downloader --url https://vt.tiktok.com/lorem --snaptik --save tiktok.mp4
```Json
```bash
$ python3 -m tiktok_downloader --url https://vt.tiktok.com/lorem --snaptik --json
```Run as web
```bash
$ python3 -m tiktok_downloader --host=0.0.0.0 --port=8000 --server
* Serving Flask app 'tiktok_downloader.server' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:8000 (Press CTRL+C to quit)
```## Deploy Heroku
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/krypton-byte/tiktok-downloader/tree/master)
## Preview## Request API using curl & wget
```bash
$ wget -O result.mp4 $(curl -sG http://127.0.0.1:8000/snaptik -d url=https://vm.tiktok.com/xxxxxxxx/|jq .[0].url -r)
```
## you can direct Download using browser or curl
```
http://127.0.0.1:8000/snaptik?url=https://vm.tiktok.com/xxxxxxxx/&type=embed
```
### Endpoint
| Name | Endpoint | Status|
|------------------------------------------------------|---------------|--------|
| Snaptik | /snaptik | ✓
| Tikmate | /tikmate |✓
| MusicalDown | /mdown |✓
| ssstik | /ssstik | ✓
| ttdownloader | /ttdownloader | ✓
| tikwm | /tikwm | ✓
| tikdown | /tikdown | x
| tiktok | /tiktok | ✓
# Donasi