亨亨猫去水印
  • 全网单个视频/图集提取
  • 主页批量提取
  • PC软件下载(Win、Mac)
  • 开通会员
  • 个人中心
  • 分站代理加盟
  • 查询记录
  • 提取API(接口)
2025 亨亨猫去水印
  • 菜单
  • 电脑软件下载
  • avatar
    • 未登录
    • 登录
    • 注册

 JavaScript代码调用接口示例

接口文档:单个帖子(视频/图集)提取接口  主页批量提取接口

以下为JavaScript语言调用提取接口的示例。示例代码中用到的userId和secretKey请前往开发者接口管理中心获取。

const api = 'https://h.aaaapp.cn/single_post';        # 单个帖子提取接口 (如果主页批量提取使用:https://h.aaaapp.cn/posts)
const userId = 'C81E728D9DC2F636F06CC14862C';    //这里改成你自己的 userId
const secretKey = 'eac9587cb785c2dd70cd07e116c'; //这里改成你自己的 secretKey

let url = 'https://v.douyin.com/MGkSpJS/';

const params = {
   "userId": userId,
   "secretKey": secretKey,
   "url": url
};

const xhr = new XMLHttpRequest();
xhr.open('POST', api, true);
xhr.setRequestHeader('content-type', 'application/json;charset=UTF-8');
xhr.onreadystatechange = function() {
  if (xhr.readyState === 4) {
    console.log(xhr.responseText);
  }
};
xhr.send(JSON.stringify(params));