”工欲善其事,必先利其器。“—孔子《论语.录灵公》
首页 > 编程 > 使用 Tinder Unblur 个人资料

使用 Tinder Unblur 个人资料

发布于2024-11-07
浏览:498

Playing with Tinder Unblur profile

Tinder 取消模糊代码说明

以下 JavaScript 代码是一个脚本,旨在对“喜欢你”部分中的 Tinder 照片进行取消模糊处理。它的工作原理是从 Tinder 的 API 获取预告图像并动态更新 DOM 以用清晰的图像替换模糊的图像。

async function unblur() {
  // Fetch the teasers (users who liked your profile) from Tinder API
  const teasers = await fetch("https://api.gotinder.com/v2/fast-match/teasers", {
    headers: {
      // Uses the Tinder API token stored in the browser's localStorage
      "X-Auth-Token": localStorage.getItem("TinderWeb/APIToken"),
      platform: "android",
    },
  })
    // Parse the response as JSON and extract the results
    .then((res) => res.json())
    .then((res) => res.data.results);

  // Select all blurred teaser elements from the Tinder page's DOM
  const teaserEls = document.querySelectorAll(
    ".Expand.enterAnimationContainer > div:nth-child(1)"
  );

  // Loop through each teaser and replace the blurred image with the clear one
  teasers.forEach((teaser, index) => {
    const teaserEl = teaserEls[index];
    const teaserImage = `https://preview.gotinder.com/${teaser.user._id}/original_${teaser.user.photos[0].id}.jpeg`;

    // Set the background image to the clear image URL
    teaserEl.style.backgroundImage = `url(${teaserImage})`;
  });
}

// Call the unblur function
unblur();

代码细目

  1. 获取预告片:

    • 该函数首先向 Tinder API 端点 https://api.gotinder.com/v2/fast-match/teasers 发出网络请求,以检索喜欢您的个人资料的用户列表。
    • 它发送存储在浏览器本地存储中的 X-Auth-Token。需要此令牌来验证请求并检索预告片列表。
    • 平台标头设置为“android”,这可能是访问 Tinder 的类似移动 API 所必需的。
  2. 选择 DOM 元素:

    • 该脚本使用 document.querySelectorAll 查找模糊预告图像所在的 DOM 元素。
    • 这些元素由 CSS 选择器 .Expand.enterAnimationContainer > div:nth-child(1) 标识,该选择器针对“Likes You”部分中的模糊图像容器。
  3. 替换模糊图像:

    • 该函数循环遍历预告片列表(从 API 返回)及其相应的 DOM 元素。
    • 对于每个预告片,它使用用户 ID 和照片 ID 构建清晰图像的 URL。
    • 然后,脚本使用清晰图像的 URL 更新每个预告片元素的背景图像,从而有效地消除照片模糊。
  4. 异步/等待:

    • unblur() 函数是异步的,允许它获取预告图像并等待响应,然后再用清晰图像更新 DOM。

如何使用

  1. 在网络浏览器上打开 Tinder 并登录。
  2. 导航到喜欢你页面。
  3. 打开浏览器的开发者工具(F12或右键单击→检查)。
  4. 转到控制台选项卡。
  5. 将脚本复制并粘贴到控制台中。
  6. 输入执行脚本,观察模糊的图像变得不模糊。

此脚本利用浏览器开发人员工具和 Tinder API 的强大功能,让您无需付费订阅即可查看喜欢您的人,从而增强用户体验。

? GitHub 存储库:Tinder Unblur - 显示您的 Tinder 喜欢

⚠️重要提示:

  • 仅用于教育目的:负责任地使用此脚本,尊重 Tinder 的服务条款和他人的隐私。
  • Tinder API 令牌:此脚本依赖于您会话的 API 令牌,当您登录 Tinder 时,该令牌会自动存储在浏览器的 localStorage 中。确保您已登录才能访问它。
版本声明 本文转载于:https://dev.to/hm_harshit/playing-with-tinder-unblur-profile-3bng?1如有侵犯,请联系[email protected]删除
最新教程 更多>

免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。

Copyright© 2022 湘ICP备2022001581号-3