instagram-bot-dm
instagram-bot-dm copied to clipboard
Use InstaPYs 2FA and grab from a list
I want to put both instadm with instapy. I have a list on one line in a .json file.
In this format
[somename, here, is, how, it, is, listed]
I want to use the 'user' variable in "insta.sendMessage(user, message='some message') I want it take from that list in iterations instead of one at a time. I've tried importing instapy and logging in a session then finishing with instaDM, but that failed. instaDM opens another socket of it's own.
The 2FA issue instaDM does not have that module
I managed to grab the list from the .json file. I made it into another list on in my instadm script. I am working on looping the class to send multiple dms
I have a large list that I want to loop. I issue is, I cannot grab one item from the list. I want it one at a time. So message 'name' out of list. Afterwards, list 'another_name' from that same list. Maybe using slice notation will work.
Found out that the .json file is output from text that was .split . Turning the .json file into a python file to create it as a list.
The same would work it you change the extension to a .py file instead of a .json file.
I got it to loop, but I am getting the inconsistent use of tabs and spaces in indentation error.
I got it to loop before I faced the issue. One the second loop, the notification pop-ups weren't there. I used an if else statement after it enters the password.
I fixed it using the editor. GO to edit, and change the spaces to tabs. That solves it for every line.
I successfully created the loop to dm multiple users. Now working on 2FA.
There are some users that do not exist. I may leave that one alone. The issue is I am unsure of how many times it will have that error.