Coder Social home page Coder Social logo

correia-jpv / github-follow-bot Goto Github PK

View Code? Open in Web Editor NEW
77.0 3.0 15.0 73 KB

๐Ÿค– Automated follow/unfollow bot for GitHub. Follow from multiple sources. Choose which users to unfollow. Custom options to control bot speed and maximum actions.

License: MIT License

Python 100.00%
python github github-api bot bots automation automatic follow followers following

github-follow-bot's Issues

TypeError: Missing/Incorrect username

Description:
When attempting to run the bot_follow.py script using Python, the following error is encountered:
e

Expected Behavior:
The script should initialize the GithubAPIBot object without errors, provided that the necessary parameters, including the username, are provided correctly.

Actual Behavior:
The script raises a TypeError with the message "Missing/Incorrect username," indicating that there is an issue with the provided username or that it is missing.

Steps to Reproduce:

Ensure Python is installed.
Navigate to the directory containing the bot_follow.py script.
Run the script using Python: python.exe .\bot_follow.py

Additional Information:

This issue seems to originate from the GithubAPIBot class constructor (__init__) in the GithubAPIBot.py file.
The error suggests that the username parameter is either missing or incorrect.
Verify that the username parameter is provided correctly when initializing the GithubAPIBot object.
Check for any typos or issues with the username variable or its assignment.
Ensure that the script is being run in an environment where the necessary dependencies and configurations are set up correctly.

Potential Fix:

Double-check the username parameter when initializing the GithubAPIBot object in the bot_follow.py script.
Ensure that the username is provided as expected, and there are no typos or formatting issues.
If the username is provided dynamically, verify that the mechanism for retrieving the username is functioning correctly.
Review the GithubAPIBot.py file to confirm that the username parameter is being handled appropriately in the __init__ method.

[HELP]

How do I make the unfollow bot work -w- I am lost now,

I tried several ways including using -t and my GitHub name and revoking token and regenerating the token and update .env

Can you just type an example of how to use the unfollow bot using the -nf

image
cd follow-bot && python bot_unfollow.py -fo

image
cd follow-bot && python bot_unfollow.py -nf -smin 50

[BUG] Incorrect environment variable Linux

'USER' environment variable being used by the bot to store the GitHub username is being overridden by the operating system username on Linux distributions that commonly use this environment variable.

A solution is to rename this environment variable to 'GITHUB_USER', for example.

[BUG] Doesn't work or follow any user even though terminal said it does!

Describe the bug
I was testing the code for days, but I was curious why the sleep took so long so I change it into 20-30s now that I have all the list of the -t followers to follow, the code follows them all successfully, but it didn't do anything at all it gave me false flag in the terminal I was expecting following 647 users but I'm still in 149
.
To Reproduce
Steps to reproduce the behavior:

  1. Go to github-follow-bot
  2. python3 bot_follow.py -t
  3. Scroll down to terminal saying it: master - python3 bot_follow.py -t

Successful authentication.

Grabbing MiChaelinzo's followings.

Grabbing followers.

Starting to follow.

Finished following!

I cannot give out my here since it would violate privacy law.

  1. See error

Expected behavior
To follow all the users from the -t

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2023-10-05 071047

Desktop (please complete the following information):

  • OS: Linux version 6.1.21-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023

  • Browser Chronium Version 113.0.5672.95 (Official Build) Built on Debian , running on Debian 11 (64-bit)

  • Version latest version (git pull)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
I thought I was following users but it was not doing anything at all!

Nothing to unfollow

Hello there, I sam still getting the Nothing to unfollow message when trying to unfollow

[REQUEST]

if the user name have anumbers it doesn't work becuase of data type

Traceback (most recent call last):
File "/home/-----/github-follow-bot/bot_follow.py", line 38, in
bot = GithubAPIBot(
^^^^^^^^^^^^^
File "/home/-----/github-follow-bot/GithubAPIBot.py", line 68, in init
self.getFollowings()
File "/home/----/github-follow-bot/GithubAPIBot.py", line 226, in getFollowings
self.followings.extend(self.getUsers(url=f"https://api.github.com/users/{username}/following"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/----/github-follow-bot/GithubAPIBot.py", line 192, in getUsers
and not (user["login"] in self.followings)
~~~~^^^^^^^^^
TypeError: string indices must be integers, not 'str'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.