Code Monkey home page Code Monkey logo

nodespider_tiktok's Introduction

nodespider_tiktok

一个用 Node.js 写的批量去水印下载抖音用户发布/喜欢列表视频的爬虫

Features

  1. 支持批量下载指定数量的用户发布/喜欢视频
  2. 支持自动重试下载失败的文件
  3. 支持自动跳过已存在的文件
  4. 支持流式下载,不会占用过多内存
  5. 支持自动保存错误日志

使用方法

在使用之前请先修改 config/config.json 配置文件

"userList": [                   // 可以下载多个用户的列表
  {
    "user": ""                  // 用户链接,支持长链和短链
    "type": "post" | "like"     // post-用户发布 | like-用户喜欢
    "limit": 0                  // 下载数限制 0 表示无限制 下载所有视频
    "username": ""              // 下载的文件夹名字,如果不填则默认为下标
  }
]
"odin_tt": ""                   // cookies 中的 odin_tt,如果工作正常则不需要修改
"passport_csrf_token": ""       // cookies 中的 passport_csrf_token,如果工作正常则不需要修改
"max_retry": 50                 // 获取内容的最大重试次数
"autoRetryDownload": true       // 是否自动重试下载失败的文件
"downloadDir": "download/",     // 下载目录

用户喜欢列表和发布作品只能下载公开状态的列表

// 安装依赖
pnpm install

// 启动爬虫
pnpm run start

如果获取列表频繁出现失败,请修改 config.js 下的 odin_tt 和 passport_csrf_token 字段

现阶段还没有实现自动用用户名字命名下载文件夹,如果你需要下载多个用户的喜欢列表并存在分类的需求,可能需要给已存在的文件夹手动重命名

目前仅支持视频内容的下载

感谢

默认的 odin_tt、passport_csrf_token 和 X-Bogus 的获取算法均来自 Johnserf-Seed/TikTokDownload 项目,非常感谢

Johnserf-Seed/TiktokDownload

ibrod83/nodejs-file-downloader

nodespider_tiktok's People

Contributors

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