百度贴吧一键签到

Created 3 months ago
Updated 2 months ago
一键签到所有关注的贴吧,支持大量贴吧、智能间隔防限流、失败自动重试
#百度贴吧
#签到助手
#批量签到
Statistics
Total Installs
218
Last 24h
+1
User Rating
-
Ad
百度贴吧一键批量签到脚本,支持获取全部关注贴吧并自动签到,带智能限流、失败重试和进度展示功能。

百度贴吧一键签到


语言 / Language:


中文

一键签到所有关注的贴吧,支持大量贴吧、智能间隔防限流、失败自动重试。

功能特性

  • 一键签到:自动获取用户关注的所有贴吧并批量签到
  • 📄 全量签到:四数据源合并获取全部关注贴吧,不再局限于部分贴吧
  • 📱 响应式设计:完美适配移动端和桌面端
  • 🎨 精美界面:采用温暖的棕色调设计风格,视觉效果优雅
  • 📊 实时进度展示:显示签到进度条和实时统计信息
  • 💾 智能缓存:自动缓存已签到贴吧,重复点击自动跳过已签
  • 智能限流:智能间隔策略,避免请求过快触发限流
  • 🔄 失败重试:对签到失败的贴吧自动重试,提高成功率
  • 🛡️ 错误处理:完善的错误捕获和提示机制

安装说明

前置条件

  1. 安装浏览器扩展:

安装步骤

  1. 打开浏览器的用户脚本管理器(如 Tampermonkey)
  2. 点击「添加新脚本」
  3. tiebaqiandao.user.js 的内容复制粘贴到编辑器中
  4. 保存脚本

使用方法

  1. 登录百度贴吧
  2. 访问任意贴吧页面(如 https://tieba.baidu.com/)
  3. 等待页面加载完成后,右下角会出现「贴吧一键签到」按钮
  4. 点击按钮即可开始批量签到,弹窗会显示实时进度
  5. 签到完成后会显示详细的签到统计

脚本配置

脚本已内置合理的默认配置,无需手动修改:

  • 翻页范围:最多翻页50页,每页200个贴吧(移动端API)
  • 签到间隔:桌面端约 1.2 秒 + 随机偏移,移动端约 1.5 秒 + 随机偏移
  • 批量冷却:每5个贴吧签到后暂停5秒
  • 请求超时:网络请求超时时间为 15-20 秒
  • 样式主题:温暖的棕色调配色方案
  • 缓存机制:按日期缓存已签到贴吧,次日自动重置

技术实现

核心功能

  1. 获取关注贴吧列表:四数据源合并策略
    • 页面 HTML 提取 forumArr
    • newmoindex 接口获取 like_forum
    • 移动端 API https://c.tieba.baidu.com/c/f/forum/like(支持每页200条)
    • PC 端 mylike 接口翻页获取
  2. 签名机制:使用 MD5 签名(参数按key排序拼接 + 'tiebaclient!!!' 后缀)确保请求合法性
  3. 去重合并:使用 Map 按贴吧ID去重,确保获取完整的关注贴吧列表
  4. 获取 TBS 参数:通过 API 获取签到所需的 tbs 参数
  5. 批量签到:依次调用签到接口完成所有贴吧签到
  6. 进度展示:实时显示签到进度条和统计信息
  7. 缓存机制:使用 GM_setValue / GM_getValue 按日期缓存已签到贴吧
  8. 失败重试:对签到失败的贴吧等待10秒后重试,间隔3-5秒

安全措施

  • 使用 GM_xmlhttpRequest 进行跨域请求,确保 Cookie 正确传递
  • 所有请求都带有合适的 Referer 和 User-Agent
  • 使用移动端 API 签名机制,确保请求被服务端正确验证
  • 避免发送不必要的请求,保护用户隐私

注意事项

  1. 使用前请确保已登录百度贴吧账号
  2. 若签到失败,请检查登录状态是否过期
  3. 脚本仅在百度贴吧域名下运行
  4. 建议不要频繁点击签到按钮,避免触发限流

更新日志

v1.4

  • 优化签到间隔策略,解决"need vcode"验证码限制问题
  • 基础签到间隔:300毫秒 + 随机偏移(-100~+100毫秒)
  • 批量冷却:每5个签到后暂停1.5-2.5秒
  • 休息机制:每100个签到后休息4.5-6.5秒
  • 验证码失败:等待10秒后重试,最多重试3次,间隔2-3秒
  • 普通失败:等待5秒后重试,最多重试3次,间隔2-3秒

v1.3

  • 采用四数据源合并策略获取贴吧列表:页面提取 + newmoindex接口 + 移动端API + mylike接口
  • 使用 crypto-js MD5 库实现签名,确保移动端 API 请求合法性
  • 支持每页200条贴吧,大幅减少请求次数
  • 优化签到间隔策略,解决"签得太快"限流问题
  • 添加失败重试机制:对签到失败的贴吧等待10秒后重试,间隔3-5秒
  • 使用 Map 去重合并,确保获取完整的关注贴吧列表

v1.2

  • 重构获取贴吧列表逻辑,改用移动端 JSON API c.tieba.baidu.com/c/f/forum/like
  • 支持每页200条贴吧,大幅减少请求次数
  • 使用 MD5 签名机制确保请求合法性
  • 修复只能获取部分关注贴吧的问题

v1.1

  • 新增翻页全量签到功能,支持获取所有关注贴吧
  • 新增缓存机制,自动跳过已签到贴吧
  • 新增实时进度条和统计展示
  • 优化签到间隔,提升签到速度

v1.0

  • 初始版本,支持基本的一键签到功能

许可证

MIT License


English

One-click sign-in for all followed Baidu Tieba forums. Supports large numbers of forums, smart rate limiting, and automatic retry for failures.

Features

  • One-click Sign-in: Automatically fetch all followed forums and sign in batch
  • 📄 Full Sign-in: Four-data-source merging strategy to get all followed forums
  • 📱 Responsive Design: Perfectly adapts to mobile and desktop devices
  • 🎨 Beautiful UI: Warm brown color scheme with elegant visual effects
  • 📊 Real-time Progress: Shows sign-in progress bar and real-time statistics
  • 💾 Smart Cache: Automatically cache signed forums, skip already signed ones on repeat clicks
  • Smart Rate Limiting: Intelligent interval strategy to prevent rate limiting
  • 🔄 Auto Retry: Automatically retry failed sign-ins to improve success rate
  • 🛡️ Error Handling: Comprehensive error catching and notification system

Installation

Prerequisites

  1. Install browser extension:

Installation Steps

  1. Open your browser's userscript manager (e.g., Tampermonkey)
  2. Click "Add new script"
  3. Copy and paste the content of tiebaqiandao.user.js into the editor
  4. Save the script

Usage

  1. Login to Baidu Tieba
  2. Visit any Tieba page (e.g., https://tieba.baidu.com/)
  3. After page loads, a "One-click Sign-in" button appears at the bottom right
  4. Click the button to start batch sign-in, dialog shows real-time progress
  5. A result dialog will show detailed sign-in statistics

Configuration

The script has built-in reasonable defaults, no manual configuration needed:

  • Pagination: Up to 50 pages, 200 forums per page (mobile API)
  • Sign-in Interval: ~1.2 seconds + random offset on desktop, ~1.5 seconds + random offset on mobile
  • Batch Cooldown: 5-second pause after every 5 forum sign-ins
  • Request Timeout: 15-20 seconds for network requests
  • Style Theme: Warm brown color scheme
  • Cache: Daily cache of signed forums, automatically resets next day

Technical Implementation

Core Features

  1. Fetch Followed Forums: Four-data-source merging strategy
    • Extract forumArr from page HTML
    • Fetch like_forum from newmoindex API
    • Mobile API https://c.tieba.baidu.com/c/f/forum/like (supports 200 forums per page)
    • PC mylike API with pagination
  2. Signing Mechanism: MD5 signature (sorted params concatenation + 'tiebaclient!!!' suffix) ensures request validity
  3. Deduplication: Use Map for deduplication by forum ID to ensure complete list
  4. Get TBS Parameter: Fetch tbs parameter via API
  5. Batch Sign-in: Call sign-in API for each forum
  6. Progress Display: Show real-time progress bar and statistics
  7. Cache Mechanism: Use GM_setValue / GM_getValue to cache signed forums daily
  8. Auto Retry: Retry failed sign-ins after 10 seconds with 3-5 second intervals

Security Measures

  • Use GM_xmlhttpRequest for cross-domain requests with proper Cookie handling
  • All requests include proper Referer and User-Agent headers
  • Mobile API signing mechanism ensures requests are properly validated by server
  • Avoid unnecessary requests to protect user privacy

Notes

  1. Ensure you're logged in to Baidu Tieba before using
  2. If sign-in fails, check if your login session has expired
  3. Script only runs on Baidu Tieba domain
  4. Avoid clicking the button too frequently to prevent rate limiting

Changelog

v1.4

  • Optimized sign-in interval strategy to solve "need vcode" verification code limitation
  • Base sign-in interval: 300ms + random offset (-100~+100ms)
  • Batch cooldown: 1.5-2.5 second pause after every 5 sign-ins
  • Rest mechanism: 4.5-6.5 second pause after every 100 sign-ins
  • Vcode failures: wait 10 seconds then retry, max 3 retries, 2-3 second intervals
  • Normal failures: wait 5 seconds then retry, max 3 retries, 2-3 second intervals

v1.3

  • Implemented four-data-source merging strategy: page extraction + newmoindex API + mobile API + mylike API
  • Use crypto-js MD5 library for signing, ensuring mobile API request validity
  • Supports 200 forums per page, significantly reducing request count
  • Optimized sign-in interval strategy to prevent rate limiting
  • Added retry mechanism for failed sign-ins: wait 10 seconds then retry with 3-5 second intervals
  • Uses Map for deduplication and merging, ensuring complete followed forum list

v1.2

  • Refactored forum list fetching to use mobile JSON API c.tieba.baidu.com/c/f/forum/like
  • Supports 200 forums per page, significantly reducing request count
  • Implemented MD5 signing mechanism for request validation
  • Fixed issue where only partial followed forums were fetched

v1.1

  • Added full pagination support for fetching all followed forums
  • Added cache mechanism to skip already signed forums
  • Added real-time progress bar and statistics
  • Optimized sign-in intervals for faster signing

v1.0

  • Initial release with basic one-click sign-in functionality

License

MIT License

Script Details
Applicable Sites
LicenseMIT
Permissions & access
Cross-origin access
tieba.baidu.comc.tieba.baidu.com
Capabilities
Network requestsStorage