A Python script that automatically searches for GitHub users by a keyword and follows them using the official GitHub API.
β This script is intended for educational and personal use only. Please follow GitHub's Terms of Service.
- Search for GitHub users by keyword.
- Automatically follow multiple users.
- Supports pagination (follow hundreds of users in one run).
- Uses GitHub REST API (safe & legal).
- Python 3.7+
- GitHub Personal Access Token (Classic)
- Go to GitHub Tokens Settings.
- Click "Generate new token" β "Generate new token (classic)".
- Give it a name (e.g.,
follow-bot
). - Select these permissions:
- β
user
- β
user:follow
- β
- Set an expiration date (recommended: 30 days).
- Click "Generate token" and copy it (you will need it later).
pip install requests
---
### 3οΈβ£ Configure the Script
Edit the TOKEN variable in the script:
TOKEN = "YOUR_PERSONAL_ACCESS_TOKEN"
---
### 4οΈβ£ Run the Script
python github_follow_bot.py
You will be prompted to enter a keyword (e.g., react, python), and the bot will search for users and follow them.
---
Example Output
π Enter keyword (e.g., react, python): react
Found 500 users
β
Followed gaearon
β
Followed acdlite
β
Followed kentcdodds
...