GramAddict / bot

Completely free and open-source human-like Instagram bot. Powered by UIAutomator2 and compatible with basically any Android device 5.0+ that can run Instagram - real or emulated.
https://docs.gramaddict.org
MIT License
1.14k stars 180 forks source link

Raise Exception on username not found or at least handle it better #39

Closed philip-ulrich closed 3 years ago

philip-ulrich commented 3 years ago

I think we should raise an exception on this issue and not let the user continue. The reason being that it's not tracking any of the actions done and it leads to bad situations where users may have been followed by the script, but not tracked. Forcing a user to "unfollow any" in order to remove them - or do it manually. I can't think of any valid reasons why we would continue if we can't get their username.

If we do want to continue, we should at least safe it to an "undefined" user or something so that data isn't lost.

Ref: https://github.com/GramAddict/bot/blob/master/GramAddict/core/storage.py#L27

Thoughts?

philip-ulrich commented 3 years ago

We already do. Turns out I already thought of this during the refactor?

https://github.com/GramAddict/bot/blame/f1548e7ffb088b7bfa88919b9c326bbeaa0d75e2/GramAddict/__init__.py#L218