Closed thelele closed 5 years ago
Thanks, will try to create a new account then.
Temporary fix: Login from web browser and get the sessionid cookie (DO NOT LOG OUT) Edit the login function as i did (paste the correct cookie)
P.S. Does the softban go away after a while (how many days?) or is it permanent?
def login(username=username, password=password):
device_id = None
try:
settings_file = "credentials.json"
if not os.path.isfile(settings_file):
# settings file does not exist
print('[W] Unable to find auth cookie file: {0!s} (creating a new one...)'.format(settings_file))
# login new
api = Client(
username, password,
on_login=lambda x: onlogin_callback(x, settings_file))
################# WORKAROUND #################
for cookie in api.cookie_jar:
if cookie.name == "sessionid":
cookie.value = "XXXXXX%XXXXXXX%XXXXXX"
################# WORKAROUND #################
else:
with open(settings_file) as file_data:
cached_settings = json.load(file_data, object_hook=from_json)
device_id = cached_settings.get('device_id')
# reuse auth settings
api = Client(
username, password,
settings=cached_settings)
################# WORKAROUND #################
for cookie in api.cookie_jar:
if cookie.name == "sessionid":
cookie.value = "XXXXXX%XXXXXXX%XXXXXX"
################# WORKAROUND #################
print('[I] Using cached login cookie for "' + api.authenticated_user_name + '".')
@123aezakmi123 I'll take a look at your snippet over the weekend, thanks for the info. I don't know anything about softbans.
Temporary fix: Login from web browser and get the sessionid cookie (DO NOT LOG OUT) Edit the login function as i did (paste the correct cookie)
P.S. Does the softban go away after a while (how many days?) or is it permanent?
def login(username=username, password=password): device_id = None try: settings_file = "credentials.json" if not os.path.isfile(settings_file): # settings file does not exist print('[W] Unable to find auth cookie file: {0!s} (creating a new one...)'.format(settings_file)) # login new api = Client( username, password, on_login=lambda x: onlogin_callback(x, settings_file)) ################# WORKAROUND ################# for cookie in api.cookie_jar: if cookie.name == "sessionid": cookie.value = "XXXXXX%XXXXXXX%XXXXXX" ################# WORKAROUND ################# else: with open(settings_file) as file_data: cached_settings = json.load(file_data, object_hook=from_json) device_id = cached_settings.get('device_id') # reuse auth settings api = Client( username, password, settings=cached_settings) ################# WORKAROUND ################# for cookie in api.cookie_jar: if cookie.name == "sessionid": cookie.value = "XXXXXX%XXXXXXX%XXXXXX" ################# WORKAROUND ################# print('[I] Using cached login cookie for "' + api.authenticated_user_name + '".')
Where would I go to edit this ? What is the file with login function and where about do I edit this into? the auth.py?
@beakwood in pyinstastories.py file search for def login and replace the entire code posted here https://github.com/notcammy/PyInstaStories/issues/17#issuecomment-501285963
OTHER FIX I solved the challenge_required error enabling the 2FA and disabling it
@123aezakmi123 I tried the code and the 2fA solution but both didn't work.
@123aezakmi123 I tried the code and the 2fA solution but both didn't work.
See both https://github.com/dvingerh/PyInstaLive/issues/57#issuecomment-616072063 and https://github.com/dvingerh/PyInstaLive/issues/57#issuecomment-524650248
It worked, it didn't even ask for challenge codes anymore, thanks !
I'm on windows, when I try to download a stories I get this error, and then when I go on instagram it says that somebody tried to connect to your account, I click on "it was me" but still when I redo the command line I have the same error.