Это не официальная поддержка API и т. д. Это просто парсер, который использует веб-API TikTok для очистки мультимедиа и соответствующей метаинформации.
Установка
tiktok-scraper требует для запуска Node.js v10+.
Установить из NPM
npm i -g tiktok-scraper
Установить из пряжи
yarn global add tiktok-scraper
В терминале
$ tiktok-scraper --help Usage: tiktok-scraper <command> [options] Commands: tiktok-scraper user [id] Scrape videos from username. Enter only username tiktok-scraper hashtag [id] Scrape videos from hashtag. Enter hashtag without # tiktok-scraper trend Scrape posts from current trends tiktok-scraper music [id] Scrape posts from a music id number tiktok-scraper video [id] Download single video without the watermark tiktok-scraper history View previous download history tiktok-scraper from-file [file] [async] Scrape users, hashtags, music, videos mentioned in a file. 1 value per 1 line Options: --version Show version number [boolean] --timeout Set timeout between requests. Timeout is in Milliseconds: 1000 mls = 1 s [default: 0] --number, -n Number of posts to scrape. If you will set 0 then all posts will be scraped [default: 0] --proxy, -p Set single proxy [default: ""] --proxy-file Use proxies from a file. Scraper will use random proxies from the file per each request. 1 line 1 proxy. [default: ""] --download, -d Download video posts to the folder with the name input [id] [boolean] [default: false] --asyncDownload, -a Number of concurrent downloads [default: 5] --hd Download video in HD. Video size will be x5-x10 times larger and this will affect scraper execution speed. This option only works in combination with -w flag [boolean] [default: false] --zip, -z ZIP all downloaded video posts [boolean] [default: false] --filepath File path to save all output files. [default: "/Users/blah/blah"] --filetype, --type, -t Type of the output file where post information will be saved. 'all' - save information about all posts to the` 'json' and 'csv' [choices: "csv", "json", "all", ""] [default: ""] --filename, -f Set custom filename for the output files [default: ""] --noWaterMark, -w Download video without the watermark. This option will affect the execution speed [boolean] [default: false] --store, -s Scraper will save the progress in the OS TMP or Custom folder and in the future usage will only download new videos avoiding duplicates [boolean] [default: false] --historypath Set custom path where history file/files will be stored [default: "/var/folders/d5/fyh1_f2926q7c65g7skc0qh80000gn/T"] --remove, -r Delete the history record by entering "TYPE:INPUT" or "all" to clean all the history. For example: user:bob [default: ""] --webHookUrl Set webhook url to receive scraper result as HTTP requests. For example to your own API [default: ""] --method Receive data to your webhook url as POST or GET request [choices: "GET", "POST"] [default: "POST"] --help Show help [boolean] Examples: tiktok-scraper user USERNAME -d -n 100 tiktok-scraper user USERNAME -d -n 100 -f customFileName tiktok-scraper hashtag HASHTAG_NAME -d -n 100 tiktok-scraper trend -d -n 100 tiktok-scraper music MUSICID -n 100 tiktok-scraper music MUSIC_ID -d -n 50 tiktok-scraper video https://www.tiktok.com/@tiktok/video/6807491984882765062 tiktok-scraper history tiktok-scraper history -r user:bob tiktok-scraper history -r all tiktok-scraper from-file BATCH_FILE ASYNC_TASKS -d -n 25
Функции
- Загружайте неограниченное количество метаданных сообщений со страниц пользователя, хэштега, трендов или Music-Id.
- Сохраняйте метаданные публикации в файлы JSON/CSV.
- Загрузите медиафайл с водяным знаком и без него и сохраните в ZIP-файл.
- Скачать одно видео без водяного знака из интерфейса командной строки
- Подпишите URL-адрес, чтобы сделать собственный запрос к API TikTok
- Извлечение метаданных со страниц пользователя, хэштега и отдельного видео.
- Сохраняйте предыдущий прогресс и загружайте только новые видео, которые не были загружены ранее. Эта функция работает только из CLI и только при включенном флаге загрузки.
- Просмотр и управление ранее загруженной историей сообщений в CLI
- Очистка и загрузка пользователя, хэштега, музыкальных каналов и отдельных видео, указанных в файле, в пакетном режиме.