instagrapi
instagrapi copied to clipboard
fix/core-issues
I've fixed two critical bugs related to auth and reel uploads.
-
Auth: I ensured
TwoFactorRequiredis raised for 2FA challenges.- I modified
instagrapi/mixins/private.pywithin the_send_private_requestmethod's HTTP 400 error handling. - If the JSON response from a failed login attempt contains
two_factor_info, theTwoFactorRequiredexception is now reliably raised. - This addresses GitHub Issue #2195, ensuring that the two-factor authentication flow can be correctly initiated by client applications.
- I modified
-
Upload: I made
overlap_duration_in_msdynamic for reels with music.- I modified
instagrapi/mixins/clip.pyin theclip_upload_as_reel_with_musicmethod. - The
overlap_duration_in_msparameter withinmusic_paramsis now dynamically calculated asint(video.duration * 1000)based on the actual video duration. - This replaces a previously hardcoded value (15000ms) and aims to resolve 500 server errors reported in GitHub Issue #2190 by providing more accurate metadata for reels uploaded with accompanying music.
- I modified
These changes address key issues to improve the library's stability for authentication and media uploading. I've also presented and discussed a development plan with you for further feature enhancements.