asciidude / instacat

An Instagram chatbot that sends images of cats made in Python
0 stars 0 forks source link

Randomly logging out #1

Open asciidude opened 2 months ago

asciidude commented 2 months ago

Since I don't have the time or energy with this project, I will provide a workaround for Instagram randomly logging people out.

Chances are you will get blacklisted and then removed from the blacklist after a while, then a code of some sort is required to be inputted into the console as verification or you'll be required to add a verification method to your account. From my knowledge, there is no way to get out of that.

Anyways, just create a starter.py file and input the following code:

from subprocess import run
from time import sleep

def start_script():
    try:
        run('python main.py', check=True) 
    except:
        handle_crash()

def handle_crash():
    sleep(120) 
    start_script()

start_script()

Please remember this is a workaround and it's not meant to be pretty. If anyone wants to create a PR with a proper fix to this issue be my guest.

asciidude commented 2 months ago

I've locked the conversation but I will be pulling PRs with fixes if any become available.