NoBotFollowers.py
Recently, I got a friend request from a verified person that seemed very suspicious. After checking his groups and going through his followers, I’ve came to a conclussion that his followers are MOST LIKELY botted and that his verified badge was probably sold to him. I’m not going to disclose this user.
I made a python script that will fetch the followers of certain users and go through all of them in order to calculate average following count. High values (>50-75) MOSTLY indicate that user’s followers are botted, results might be wrong due to some bot accounts having insane following count, but generally it works. The more pages you process, the better results you will get.
A roblox cookie is required to use this script due to roblox rate limiting after 10 requests if you dont authenticate, PLEASE USE AN ALT ACCOUNT COOKIE. After entering a cookie it will be stored in a local file created in the same directory (cookie.txt), feel free to delete it after you are done.
This script takes 2 inputs, User ID
and Pages count
(each page is 100 followers and script will make 100 requests for each page), it’s recommended to not use mobile traffic for this script. Each page takes about 17-20 seconds to process (my average is 6 users per second)
Requirements: requests
, tqdm
Script
import requests as re
from tqdm import tqdm
from time import sleep
# NoBotFollowers.py
# @dauser
session = re.Session()
try:
file = open('cookie.txt', mode='r')
session.cookies.set('.ROBLOSECURITY', file.read())
file.close()
except FileNotFoundError:
cookie = input('Enter a roblox cookie from your alt (preferably). It should start with (_|WARNING:) >>> ')
file = open('cookie.txt', mode='w')
file.write(cookie)
file.close()
session.cookies.set('.ROBLOSECURITY', cookie)
def get_followers(user_id: int, max_pages=100):
print('Fetching followers...')
pages = 0
cursor = ''
followers = []
while pages < max_pages:
pages += 1
data = session.get(f'https://friends.roblox.com/v1/users/{user_id}/followers?limit=100&sortOrder=Asc&cursor={cursor}').json()
for follower in data['data']:
followers.append(follower['id'])
if data['nextPageCursor']:
cursor = data['nextPageCursor']
else:
break
return followers
def get_following_count(user_id: int):
data = session.get(f'https://friends.roblox.com/v1/users/{user_id}/followings/count')
if data.status_code != 200:
sleep(1)
return get_following_count(user_id)
else:
return data.json()['count']
def get_average_following_count(user_ids: list):
total_following = 0
print('Checking user ids')
for user_id in tqdm(user_ids):
total_following += get_following_count(user_id)
return total_following / len(user_ids)
def get_user_stats(user_id: int, pages_count: int):
user_data = session.get(f'https://users.roblox.com/v1/users/{user_id}').json()
average_following = get_average_following_count(get_followers(user_id, max_pages=pages_count))
print(f'Status for user {user_data['name']}{user_data['hasVerifiedBadge'] and ' (verified)' or ''}')
print(f'Average following count: {average_following}')
print('~ NoBotFollowers ~')
print('Enter a user id and pages count (each pages contains 100 followers and takes ~20 seconds to process, 20-30 pages is recommended)')
print('This script go through followers and calculate thier average following count, the higher this value, the more likely that followers are sold (mostly >100)')
print()
while True:
user_id = int(input('User ID >>> '))
pages_count = int(input('Pages count >>> '))
get_user_stats(user_id, pages_count)
(I’m kind of new to python, dont blame me)
Some results I've got from this script
The user that I suspected in buying verified badge: 20 pages, 1027 average following count (very high)
My profile (thedauser 17.8k): 20 pages 29.8 average following count
If you have any improvements for the script (for ex. threading implementation), feel free to reply to this post and I will update the script.
EDIT: I would like to highlight the fact that this tool will not identify the people with botted followers perfectly and that manual review is still required for that. From my research, it’s mostly traders that use follower bot services and buy verified badges. You can quickly find them by checking any of the bot profiles.