Back to scripts

utility

2024-03-21v1.0.0Community

Usage

Steps

  1. 登錄賬號
  2. 運行腳本
  3. 等待自動完成每日任務

Notes

  • 每24小時只能運行一次
  • 請勿頻繁使用
  • 需要保持頁面打開

Requirements

  • 必須登錄賬號
  • 需要穩定的網絡連接

Code

async function claimDailyRewards() {
  try {
    const response = await fetch('https://api.blooket.com/api/users/dailyrewards', {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
        'X-Blooket-Build': '0'
      }
    });

    if (!response.ok) {
      throw new Error('Failed to check daily rewards');
    }

    const data = await response.json();
    
    if (data.available) {
      const claimResponse = await fetch('https://api.blooket.com/api/users/claimdailyreward', {
        method: 'PUT',
        headers: {
          'Content-Type': 'application/json',
          'X-Blooket-Build': '0'
        }
      });

      if (!claimResponse.ok) {
        throw new Error('Failed to claim daily reward');
      }

      alert('Successfully claimed daily reward!');
    } else {
      alert('No daily reward available yet.');
    }
  } catch (error) {
    alert('Error: ' + error.message);
  }
}

claimDailyRewards();

Changelog

Version 1.0.0

2024-03-21
  • 初始版本發布
  • 自動完成每日任務
  • 添加完成提醒