Open Kweiza opened 1 year ago
for login use this method:
def login(username, password): cl = Client()
try:
if os.path.exists(f'settings({username}).json'):
cl.load_settings(f'settings({username}).json')
if cl.login(username=username, password=password) == True:
cl.dump_settings(f'settings({username}).json')
else:
if cl.login(username=username, password=password) == True:
cl.dump_settings(f'settings({username}).json')
print('login successfully')
except Exception as e:
print(e)
return cl
@MohammadHosein21 it is not working
def login(username, password):
cl = Client()
# cl.delay_range = [2, 5]
try:
if os.path.exists(f"settings({username}).json"):
cl.load_settings(f"settings({username}).json")
if cl.login(username=username, password=password) == True:
cl.dump_settings(f"settings({username}).json")
else:
if cl.login(username=username, password=password) == True:
cl.dump_settings(f"settings({username}).json")
print("login successfully")
return cl
except Exception as e:
print(e)
print "login successfully" but client functions are not working. functions throw exception LoginRequired
return cl must be in the last line and use instagrapi version 2.0.0
Describe the bug If the amount increases by more than a certain number, a LoginRequired exception occurs.
To Reproduce After
cl.login
,cl.hashtag_medias_recent(tag, amount=100)
is working but,cl.hashtag_medias_recent(tag, amount=10000)
is not working. occurring LoginRequired ExceptionTraceback
Expected behavior Return all hashtag media equivalent to the total amount
Screenshots
Desktop (please complete the following information):