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

Alternative Search #18

Closed GeikoHub closed 3 years ago

GeikoHub commented 4 years ago

Maybe more a request than a bug/issue. But when you check followers of someone with lot of followers, if a bug appears or you just don't want the script runs h24.. You get that....

So maybe thinking about to take more randomzed interactions than one by one?

And by the way, 2 likes per profile is really short, in my case i constat that it needs at least 6 to 15 likes on one profile to have interest. (i know we can change that in the scritpt) Capture

Foncekar commented 4 years ago

with "--likes-count" parameter you can already choose the number of like per profile, so you don't have to edit the code for that.

GeikoHub commented 4 years ago

@Foncekar yes i know that for the number of like per profile, that's what i mentionned ;) That's for always taking from the 1st follower of the "--bloggers" list each time you launch the script that cause problem.

So that's why i asked for something more randomized

gvmturl commented 4 years ago

@Foncekar yes i know that for the number of like per profile, that's what i mentionned ;)

That's for always taking from the 1st follower of the "--bloggers" list each time you launch the script that cause problem.

So that's why i asked for something more randomized

@GeikoHub the script is checking people that you already open (interacted or is private) check > scroll > check > scroll... it only counts when open a profile, so if you set --likes-count 30 it will only count if you interact a profile... while terminal message its not opening any profile, so not counting. Be sure to update the bot.

i am always in favor of randomization, for now you can try to randomize bloggers usernames in the line you use to start it

maybe something to --bloggers-random ?

@alexal1 1# Also should be fine if bot could interact with people that interacts(likers on photos or/and commentators) with --bloggers --followers interact with bloggers followers --following interact with bloggers following --likers interact with bloggers photo likers --commentators interact with bloggers photo commentators

2# Dont you think that bloggers usernames should be in a file? --bloggers bloggers.txt

3# Dont you think that is better use 2 different files to storage interact / is private(has less than 6 photos) ? or maybe storing into a .json list with some information about this user? Like: blogger from / private user(True or False) / interacted (True or False)... the data will be more readable and analyzable so we can check what blogger is most effective comparing with our results (interacted back), we also could take actions based on that values, like DM #20 people we know that is private(has less than 6 photos) using a parameter to randomize action, for example: --privateprofiledm 50 in 2 PrivateProfile already known, 1 will receive a message...

4# Something that i got here is:

        FrameLayout = device(resourceId='com.instagram.android:id/follow_list_user_imageview',
                               className='android.widget.FrameLayout') #Profile picture
        StoriesTrue = device(resourceId='com.instagram.android:id/follow_list_user_imageview',
                               className='android.view.View') #Stories label
       PrivateProfile = False
if FrameLayout and StoriesTrue == True:
      PrivateProfile = False
else:
      Print("Not sure if is private") #Any action

Its something that certifies that its not a private user, maybe if we have the option, using a parameter, to get only those people the work could be faster and also ensure that we are interacting to a last 24h active user.

5# .dumb take a screenshot from device right? Cant we match a icon or a lack of it by grayscale using PIL and numpy something like that:

from PIL import ImageGrab, ImageOps, Image
from numpy import *

class Coordinates():
    iconWanted = (632, 329, 695, 393)
class Images():
    iconWanted = 35949

def info(txt):
    box = txt
    image = ImageGrab.grab(box)
    grayImage = ImageOps.grayscale(image)
    a = array(grayImage.getcolors())
    return a.sum()

if __name__ == "__main__":
    box = Coordinates.IconWanted
    print(info(box))

def main():
    while True:
        if (info(Coordinates.iconWanted) == Images.iconWanted):
        #Any ADB Code
main()

in this case you have to define coordinates... cant remember now... but sure that these coordinates can be "random" Maybe it can be used to resolving some troubles... not sure, have to think better on it...

6# Could you create a Telegram Group for people that want to contribute on implementation this project? Still have some doubts about how everything is working. Maybe you can share what implementation you working on, progress, tests ... also lead some implementation sharing your experience. What do you think about it?

jonap339 commented 4 years ago

Hello, is there a way to add the parameters inside the script and just run the command "python insominac.py" in cmd? I'm starting python programming and can't find where to modify the script to add the parameter --blogger

I hope you have understood my query, the idea is to have a script for each account with their respective parameters

Thank you!

gvmturl commented 4 years ago

Hello, is there a way to add the parameters inside the script and just run the command "python insominac.py" in cmd? I'm starting python programming and can't find where to modify the script to add the parameter --blogger

I hope you have understood my query, the idea is to have a script for each account with their respective parameters

Thank you!

Hello @jonap339 thanks for participating on our community and welcome to python.

Using a different file for each action you have to get lot of files for each combination of actions, while using parameters you can set how script will works in just a file!

@alexal1 maybe something that should be fine is storage all parameter combination in a .txt or .json file? Following the above thought, would be: python insomniac.py parameters.txt bloggers.txt

jonap339 commented 4 years ago

I understand, It would be logical to be able to assemble everything from a single file since it first allows better statistical control, to see which combination works best for a certain time, etc. I think that if the idea is to automate instagram, I currently work with 9 different accounts and I want them to start alone with a timer, I could not do it and it is a shame. @alexal1 could this be possible? Parameterize in a file and run it?

I think the operation should be the same as in instapy. Where in a single script, configure everything by parameters and run it. Thank you very much as always!

gvmturl commented 4 years ago

I understand, It would be logical to be able to assemble everything from a single file since it first allows better statistical control, to see which combination works best for a certain time, etc. I think that if the idea is to automate instagram, I currently work with 9 different accounts and I want them to start alone with a timer, I could not do it and it is a shame. @alexal1 could this be possible? Parameterize in a file and run it?

I think the operation should be the same as in instapy. Where in a single script, configure everything by parameters and run it.

Thank you very much as always!

Are you actually using instapy on these 9 accounts? How you handle it? Use proxies?

Thanks...

jonap339 commented 4 years ago

No, I no longer use instapy, because it is highly detectable through the web, but yes, I used proxies! Currently I work manually :( 2 accounts for each mobile device and I do not receive blockages (always under certain limits). I can work comfortably, 2 years working this way without problems. A bot that works through Android is everything I expected, since That allows you to add higher limits, stop following, likear, etc. On the web with instapy this is more limited.

gvmturl commented 4 years ago

No, I no longer use instapy, because it is highly detectable through the web, but yes, I used proxies! Currently I work manually :( 2 accounts for each mobile device and I do not receive blockages (always under certain limits). I can work comfortably, 2 years working this way without problems. A bot that works through Android is everything I expected, since That allows you to add higher limits, stop following, likear, etc. On the web with instapy this is more limited.

Is not a problem using multiple accounts into the same network even 2 accounts per device?

Btw have you tried using insomniac project with 2 devices connected and working at same time?

Thank you.

jonap339 commented 4 years ago

No, it is not a problem. Think of it this way, you're in a bar with 10 friends and all 10 are using Instagram, should they all be blocked? Of course not! I currently use an Android device to manage 2 accounts. I use very low limits, on each account I follow 65 people in the morning and 65 people at night. If you follow 70 and 70, in a couple of weeks you will receive blocks;) At 65 and 65 a month, you'll get approximately 1,500 to 2,300 new followers.

2- I have not yet used Insomniac connected on two devices at the same time, since I am starting to use it and I am testing it. I understand that there is a function that uses something like: adb [-d | -e | -s serial_number], where you can choose by serial number, which device to use, but I'll try again later, after understanding "insomniac" well.

If you have any doubts I'm at your order

alexal1 commented 4 years ago

@jonap339

I currently work with 9 different accounts and I want them to start alone with a timer, I could not do it and it is a shame. @alexal1 could this be possible? Parameterize in a file and run it?

By now you can simply create a shell script. It's an executable txt file with terminal commands. E.g.

adb connect <device1>
python insomniac.py <some arguments>
adb disconnect

adb connect <device2>
python insomniac.py <some arguments>
adb disconnect

If you want to start execution on particular time, you can use cron on Linux/macOS or some analog (I'm sure there is one) on Windows.

jonap339 commented 4 years ago

Excellent! I'm excited about this, it was what I needed! I bet a lot on this project! I don't know much about python, but I do know a lot about instagram limits and locks. So what you need, I am at your disposal

alexal1 commented 4 years ago

@gvmturl I've read carefully all your suggestions.

Interaction with interactors Little by little we'll implement all features of InstaPy, but now I have to prioritize tasks and do the most important ones at first. Maybe it's better to create a separate issue with thoughts on new features?

Input from txt files That's not a problem at all, can be done easily. Do you really need it? Seems that --bloggers-random is a more needed feature now.

Using JSON Yes, I was thinking about it too. It's definitely better that multiple txt files.

Skipping private accounts faster Already done, please check v1.2.7. In a slightly different way though.

Telegram group Done, here it is: https://t.me/insomniac_chat. I'll add the link to the main page too.

alexal1 commented 4 years ago

@GeikoHub

And by the way, 2 likes per profile is really short, in my case i constat that it needs at least 6 to 15 likes on one profile to have interest. (i know we can change that in the scritpt)

Supported up to 12 likes in v1.2.9. More than 12 likes requires additional scrolling and also some way to distinguish already liked posts from not liked. So this will be done later.