alexal1 / Insomniac

Instagram bot for automated Instagram interaction using Android device via ADB
https://insomniac-bot.com
MIT License
687 stars 159 forks source link

Organizing actions and storage data #4

Closed gvmturl closed 3 years ago

gvmturl commented 4 years ago

Hello brother, I think the action —bloggers should be —likefollowers and these interacted_users.txt should be likedfollowers.txt this is a better name for what this action really do. -followedfollowers.txt -unfollowed.txt -followed.txt -followedhashtags.txt

An idea unfollowing / unfollow non followers... Is there anyway scroll down to get all text value in com.instagram.android:id/follow_list_username From followers and following in 2 different followers.txt following.txt compare both in python backside then create a nonfollowers.txt Then start to unfollow by a list?

Also cold be added functions as —followlist and —unfollowlist —skiplist

I m trying to understand how code works to help on improvement, can’t you make a short video explaining how to you are working on for helping us make it grow faster? Think about that

I m not sure how adb works... Do you think that is there anyway to turn all that actions into an Android native app using kivy / buildozer importing adb and uiautomator library on it?

Why aren’t you writing this code using python3? Like code is right now it will also works on python2 as we know the way python2 goes...

I will be attentive on your comments.

alexal1 commented 4 years ago

Hello brother, I think the action —bloggers should be —likefollowers and these interacted_users.txt should be likedfollowers.txt this is a better name for what this action really do. -followedfollowers.txt -unfollowed.txt -followed.txt -followedhashtags.txt

What if I want to like 2 posts of each user and then follow him/her? With current naming it can be done through python insomniac.py --bloggers <some bloggers> --likes-count 2 --follow-percentage 100. I don't understand how to do it with the naming you suggest.

An idea unfollowing / unfollow non followers... Is there anyway scroll down to get all text value in com.instagram.android:id/follow_list_username From followers and following in 2 different followers.txt following.txt compare both in python backside then create a nonfollowers.txt Then start to unfollow by a list?

Jeah, that's an idea. It's even better to make just 2 loops: first iterate through followers, then iterate through followings and unfollow non-followers while going.

Also cold be added functions as —followlist and —unfollowlist —skiplist

Didn't understand that, could you explain?

I m trying to understand how code works to help on improvement, can’t you make a short video explaining how to you are working on for helping us make it grow faster? Think about that

Do you mean explaining how I work with adb and uiautomator, or about structure of the project?

I m not sure how adb works... Do you think that is there anyway to turn all that actions into an Android native app using kivy / buildozer importing adb and uiautomator library on it?

Unfortunately, Android apps can't interact with each other. You can send Intents or use IPC, but another app must be prepared and answer correctly, so that's not our case. adb and uiautomator also don't work from applications.

Why aren’t you writing this code using python3? Like code is right now it will also works on python2 as we know the way python2 goes...

Well... I didn't think much about it 😅 python2 is preinstalled on my mac so I just started writing. By now I don't see why migrate to python3, are there any advantages?

gvmturl commented 4 years ago

@alexal1 Thanks for replying bro.

What if I want to like 2 posts of each user and then follow him/her? With current naming it can be done through python insomniac.py --bloggers <some bloggers> --likes-count 2 --follow-percentage 100. I don't understand how to do it with the naming you suggest.

Is the script trying to skipping users that are into interacted_users.tx right? If only use--bloggers <some bloggers> or --bloggers <some bloggers> --likes-count 2. The action will add users into interacted_users.tx, after this session if i try --bloggers <some bloggers> --likes-count 2 --follow-percentage 100 will it skip using that same list? Thats i m trying to understand.

likes-count should be in random range by default and user could specificity a value to this range something like --likes-count 2-5 and like count be set randomly values between 2 and 5 in each user. Same idea must be used in how many users will be interacted in each "--bloggers" I think that not only the actions should be randomized but also how the actions are done.

Also could be added functions as —followlist and —unfollowlist —skiplist

Didn't understand that, could you explain?

You could add functions that follow and unfollow people from a .txt list. I think that unfollowed people must be commented or marked with a tag in .txt list, not excluded because people that are unfollowed could be add to into blacklist, if i unfollowed someone maybe i dont want to interact with him anymore because i know that it will be a lost of time.

the same to --skiplist i add people that i want to skip into skiplist.xt For example if i want to unfollow non followers but keep some famous people or pages that i like that i know that will never follow me back?

Well... I didn't think much about it 😅 python2 is preinstalled on my mac so I just started writing. By now I don't see why migrate to python3, are there any advantages?

"As of January 1st, 2020 no new bug reports, fixes, or changes will be made to Python 2, and Python 2 is no longer supported. A few changes were made between when we released Python 2.7. 17 (on October 19th, 2019) and January 1st." https://www.python.org/doc/sunset-python-2/

the advantage is start this new project with a lot of potential in something that will be supported longer without a necessity of force-migrating.

I m not sure how you doing it, but using virtual environment you can install/use any version of python and also have an specific library in which project you're working, that's a good practice for not having problems of compatibility, virtualenv is a default library on python 3.

Do you mean explaining how I work with adb and uiautomator, or about structure of the project?

Yes bro, should be fine if make a short video how you the make script works with uiautomator and adb. The community must be supportive to be active and sustain this project. It will be bigger how faster it grows and helps all community. Are you using uiautomatorviewer?

@GabrieleAnsaldo Are you going to help on improving telegram bot tool to the script?

I will be attentive to your comments, hope you have a nice day.

GabrieleAnsaldo commented 4 years ago

Hello, @gvmturl and @alexal1 , I am currently having some problems installing uiautomator, so for me it’s a bit hard to help on the coding side. However, I’m always willing to give ideas and suggestions. I will try to set up uiautomator on my computer soon (after I finish my thesis which is taking a lot of time).

For the time being, I can open a pull request for the additional feature of connecting insomniac to telegram so that it’s easy to get notifications directly on your phone if something happens to the bot and you are not home.

If there’s anything I can do let me know!!

alexal1 commented 4 years ago

Is the script trying to skipping users that are into interacted_users.tx right? If only use --bloggers or --bloggers --likes-count 2. The action will add users into interacted_users.tx, after this session if i try --bloggers --likes-count 2 --follow-percentage 100 will it skip using that same list? Thats i m trying to understand.

Yes, that's right.

likes-count should be in random range by default and user could specificity a value to this range something like --likes-count 2-5 and like count be set randomly values between 2 and 5 in each user. Same idea must be used in how many users will be interacted in each "--bloggers" I think that not only the actions should be randomized but also how the actions are done.

Wow, great idea! Definitely need to implement it.

You could add functions that follow and unfollow people from a .txt list

You see, such following can only be achieved through searching each user and then following him/her. That's ridiculous behavior, and I think it's one of the reasons why InstaPy is being banned so quickly.

For example if i want to unfollow non followers but keep some famous people or pages that i like that i know that will never follow me back?

You can follow them manually. The script will always unfollow only those who are followed by it.

Yes bro, should be fine if make a short video how you the make script works with uiautomator and adb

Ok, I'll do it soon.

As for Python 3 – you convinced me :) I did the migration, so since of v1.2.3 the script works on Python 3.

alexal1 commented 4 years ago

@GabrieleAnsaldo that sounds interesting, we'll look forward for it :)

mastrolube commented 4 years ago

Hi there! I've discovered this project thanks to your comment in an instapy post :) I really like that idea!

Thanks for your good work!