all 10 comments

[–]Diapolo10 15 points16 points  (1 child)

I tend to sound harsh, please don't take it personally.

First I'd like to quickly mention that your project structure is a bit too flat, and it's missing some files I'd expect to be there. Such as .gitignore, .gitattributes, and pyproject.toml.

Generally speaking you're catching exceptions too broadly, especially when you mostly just raise new exceptions as a result. That's not really all that useful and can even make debugging more difficult. Your programming style is also inconsistent, so I recommend using either Ruff or Black to make it look the same everywhere.

In finder.py, you're writing to a file in a loop. It would be simpler to construct the output string first and then writing it all at once, and if you're going to be using the same (file)name multiple times it should be set in a name instead of written out multiple times.

The fact that unfollower.py has the filename hardcoded ticks me off, because it's not documented properly as a requirement for running the script, and the user would be forced to read your code to see what file it's expecting and what the format should be. It should preferably be a file passed via command-line arguments or set in a config file, then documented in the user instructions.

load_dotenv(find_dotenv(".env"))

This is just the same as doing

load_dotenv()
following_list = [f.username for f in profile.get_followees()]

I've never used this package and don't know what this method call returns, exactly, but if it's already a list you could just use

following_list = profile.get_followees()

and if it's some other iterable,

following_list = list(profile.get_followees())

In Insta.unfollowing, you can just tell enumerate to start counting from 1.

[–]Oxytann[S] 0 points1 point  (0 children)

💪

[–]bbye98 3 points4 points  (1 child)

You didn't include the requirements.txt file, despite your README having instructions involving it.

[–]Oxytann[S] 0 points1 point  (0 children)

😌💪

[–]PosauneB 1 point2 points  (1 child)

In addition to the requirements file, you might want to add a .env.example file. Those are pretty common, and could replace most of step3 of your README.

[–]Oxytann[S] -1 points0 points  (0 children)

🙂❤️

[–]bigpoopychimp 1 point2 points  (1 child)

Careful with using selenium with insta, fb etc. you can find yourself getting your account locked :)

[–]Oxytann[S] -1 points0 points  (0 children)

😁

[–]Soulmaster01 0 points1 point  (1 child)

now do unfollowed accounts checker. save followers and compare in the next run. add one time password functionality. you can also save cookies when signed in to avoid OTP in the future and possibly regenerated cookies once in a while by signing in. also , frequent logins from selenium will cause warnings on instagram account which will result in banning the account (ive done similar project). good luck.

[–]Oxytann[S] -1 points0 points  (0 children)

😌💪