Skip to content

Latest commit

 

History

History
83 lines (60 loc) · 2.29 KB

README.md

File metadata and controls

83 lines (60 loc) · 2.29 KB

TikTok archiver (ttarc)

NOTE: As of 2020-04-23 5PM CET, the trending endpoint returns an empty list only. Hence, as is, this program does not fetch any data.


Go Report Card

Inspiration: tiktok-feed by CorentinB.

Minimalistic TikTok archival tool using https://m.tiktok.com/node/share/trending.

Collects the trending JSON document and linked (mp4) video clips and puts them into WARC via wget (1.14 or higher).

Install

$ go get github.com/miku/cmd/ttarc/...

or use some Linux packages (there's an armhf version for an SBC)

Run

$ ttarc
$ ls -lah
...
ttarc-trending-20200312214721.cdx
ttarc-trending-20200312214721.warc
...

This can be put into cron, e.g. to be run every 15 minutes.

*/15 * * * * /usr/local/bin/ttarc -P /tmp/ttarc -log /tmp/ttarc/ttarc.log

Usage

Usage of ttarc:
  -P string
        output directory (default ".")
  -b    ignore wget errors, just log them
  -f string
        basename for warc file (default "ttarc-trending-20200312224313")
  -log string
        log to stdout, if empty
  -ua string
        user agent (default "Mozilla/5.0 (Windows NT 10.0; ... )
  -verbose
        be verbose
  -version
        show version and exit

TODO

Stills

Extracted via warcio, ffmpeg and imagemagick.