Skip to content

Calculate the number of deactivated followers in group/user#183

Open
konard wants to merge 3 commits intomainfrom
issue-37-bad877e3
Open

Calculate the number of deactivated followers in group/user#183
konard wants to merge 3 commits intomainfrom
issue-37-bad877e3

Conversation

@konard
Copy link
Copy Markdown
Owner

@konard konard commented Sep 22, 2025

🎯 Summary

This PR implements functionality to calculate the number of deactivated followers in VK groups or for individual users, addressing issue #37.

✨ Features

  • Universal Script: Works for both VK groups and individual users
  • Comprehensive Counting: Counts deactivated users (banned/deleted status)
  • Detailed Statistics: Provides total count, deactivated count, active count, and percentage
  • Rate Limiting: Includes proper API rate limiting to avoid limits
  • Batch Processing: Efficiently processes large follower lists in batches

📁 Files Added

  • count-deactivated-followers.js - Main script for counting deactivated followers
  • __tests__/count-deactivated-followers.test.js - Unit tests for the functionality
  • experiments/test-count-deactivated-followers.js - Experiment script for validation

🚀 Usage

# Count deactivated members in a group
node count-deactivated-followers.js 54530371 group

# Count deactivated followers for a user  
node count-deactivated-followers.js 123456789 user

🔧 Technical Implementation

  • Uses VK API groups.getMembers for group analysis
  • Uses VK API users.getFollowers for user analysis
  • Filters users with deactivated field set to 'banned' or 'deleted'
  • Processes up to 100,000 followers with 1000-item batches
  • Includes 200ms delay between API calls for rate limiting

📊 Sample Output

=== RESULTS ===
Target: group 54530371
Total members: 10000
Active members: 8500
Deactivated members: 1500
Deactivated percentage: 15.00%

✅ Testing

  • All unit tests pass
  • Experiment validation successful
  • Follows existing codebase patterns and conventions

Fixes #37

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #37
@konard konard self-assigned this Sep 22, 2025
@konard konard changed the title [WIP] Calculate the number of deactivated followers in group/user Calculate the number of deactivated followers in group/user Sep 22, 2025
- Add count-deactivated-followers.js script for both groups and users
- Support VK API groups.getMembers and users.getFollowers endpoints
- Include comprehensive statistics and percentage calculations
- Add unit tests with full coverage of core functionality
- Add experiment script for validation and testing
- Follow existing codebase patterns and rate limiting practices

Fixes #37

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard marked this pull request as ready for review September 22, 2025 20:20
@konard
Copy link
Copy Markdown
Owner Author

konard commented Sep 22, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (154KB)
🔗 View complete solution draft log


Log automatically attached by solve.mjs with --attach-logs option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calculate the number of deactivated followers in group/user

1 participant