Open ghost opened 2 years ago
Use: from time import sleep, and wait between requests. It might be useful to read this: https://thepreviewapp.com/instagram-limits/
Try to save the session settings to avoid logging in every time you run the script. Ex:
def __init__(self):
self._cl = Client()
if os.path.exists(IG_CREDENTIAL_PATH):
self._cl.load_settings(IG_CREDENTIAL_PATH)
self._cl.login(IG_USERNAME, IG_PASSWORD)
else:
self._cl.login(IG_USERNAME, IG_PASSWORD)
self._cl.dump_settings(IG_CREDENTIAL_PATH)
Also, try to take a look at the examples
Describe the bug When I download approx. more than ten videos from the API, I get a phishing warning and the code halts.
To Reproduce
Traceback After around ten iterations...
instagrapi.exceptions.ChallengeUnknownStep: ChallengeResolve: Unknown step_name "delta_acknowledge_approved" for "username" in challenge resolver: {'step_name': 'delta_acknowledge_approved', 'flow_render_type': 3, 'bloks_action': 'com.instagram.challenge.navigation.take_challenge', 'nonce_code': '0iM3UZIASk', 'user_id': 2250886191, 'cni': 18283399567078192, 'challenge_context': '{"step_name": "delta_acknowledge_approved", "nonce_code": "0iM3UZIASk", "user_id": 2250886191, "cni": 18283399567078192, "is_stateless": false, "challenge_type_enum": "GENERIC_PHISHED", "present_as_modal": false}', 'challenge_type_enum_str': 'GENERIC_PHISHED', 'status': 'ok'}
Expected behavior I want to download at least 30-50 reels without getting this error.
Screenshots
Desktop (please complete the following information):
Additional context Please respond as soon as possible, thanks!