@a-soul/extractor-douyin 中文文档教程

发布于 3年前 浏览 48 项目主页 更新于 3年前

@a-soul/extractor-douyin

不使用 API 的抖音纯 RENDER_DATA 数据提取器/抓取器。

Features

  • Simple, fast, ESM by default
  • Minimal dependencies, HTTPS requests by got

Usage

import extract from '@a-soul/extractor-douyin';

const url = `https://www.douyin.com/user/MS4wLjABAAAA5ZrIrbgva_HMeHuNn64goOD2XYnk4ItSypgRHlbSh1c`;
const resp = await extract(url);

console.log(resp._location);
//=> /user/MS4wLjABAAAA5ZrIrbgva_HMeHuNn64goOD2XYnk4ItSypgRHlbSh1c

Options

const options = {
  mobileUserAgent: `got`,
  desktopUserAgent: `got`,
  requestOptions: {
    timeout: {
      request: 3000
    },
    retry: {
      limit: 3,
    }
  }
}
await extract(url, options);

License

AGPL-3.0

@a-soul/extractor-douyin

Pure RENDER_DATA data extractor/scraper for Douyin without using API.

Features

  • Simple, fast, ESM by default
  • Minimal dependencies, HTTPS requests by got

Usage

import extract from '@a-soul/extractor-douyin';

const url = `https://www.douyin.com/user/MS4wLjABAAAA5ZrIrbgva_HMeHuNn64goOD2XYnk4ItSypgRHlbSh1c`;
const resp = await extract(url);

console.log(resp._location);
//=> /user/MS4wLjABAAAA5ZrIrbgva_HMeHuNn64goOD2XYnk4ItSypgRHlbSh1c

Options

const options = {
  mobileUserAgent: `got`,
  desktopUserAgent: `got`,
  requestOptions: {
    timeout: {
      request: 3000
    },
    retry: {
      limit: 3,
    }
  }
}
await extract(url, options);

License

AGPL-3.0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文