From d3237e53ce77556e6fd38192af140137951e807e Mon Sep 17 00:00:00 2001 From: Evil Date: Sat, 22 Apr 2017 23:07:33 +0200 Subject: [PATCH 01/28] Update versions Update versions --- InstagramAPI/src/Constants.py | 16 ++++++------- InstagramAPI/src/Instagram.py | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/InstagramAPI/src/Constants.py b/InstagramAPI/src/Constants.py index 459edde..9a052a9 100644 --- a/InstagramAPI/src/Constants.py +++ b/InstagramAPI/src/Constants.py @@ -1,12 +1,12 @@ -class Constants(object): - """ - Constant declarations. - """ +# /** +# * Constant declarations. +# */ + +class Constants: API_URL = 'https://i.instagram.com/api/v1/' - VERSION = '9.2.0' - IG_SIG_KEY = '012a54f51c49aa8c5c322416ab1410909add32c966bbaa0fe3dc58ac43fd7ede' - EXPERIMENTS = 'ig_android_ad_holdout_16m5_universe,ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_oppo_app_badging,ig_android_ad_remove_username_from_caption_universe,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_ad_always_send_ad_attribution_id_universe,ig_android_universe_video_production,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_video_playback_bandwidth_threshold,ig_android_direct_link_preview,ig_android_direct_typing_indicator,ig_android_preview_capture,ig_android_feed_pill,ig_android_profile_link_iab,ig_android_story_caption,ig_android_network_cancellation,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_follow_request_text_buttons,ig_android_feed_zoom,ig_android_drafts_universe,ig_android_disable_comment,ig_android_user_detail_endpoint,ig_android_os_version_blocking,ig_android_blocked_list,ig_android_event_creation,ig_android_high_res_upload_2,ig_android_2fac,ig_android_mark_reel_seen_on_Swipe_forward,ig_android_comment_redesign,ig_android_ad_sponsored_label_universe,ig_android_mentions_dismiss_rule,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_video_reuse_surface,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_insta_video_universe,ig_android_search_null_state,ig_android_universe_reel_video_production,liger_instagram_android_univ,ig_android_direct_emoji_picker,ig_feed_holdout_universe,ig_android_direct_send_auto_retry_universe,ig_android_samsung_app_badging,ig_android_disk_usage,ig_android_business_promotion,ig_android_direct_swipe_to_inbox,ig_android_feed_reshare_button_nux,ig_android_react_native_boost_post,ig_android_boomerang_feed_attribution,ig_fbns_shared,ig_fbns_dump_ids,ig_android_react_native_universe,ig_show_promote_button_in_feed,ig_android_ad_metadata_behavior_universe,ig_android_video_loopcount_int,ig_android_inline_gallery_backoff_hours_universe,ig_android_rendering_controls,ig_android_profile_photo_as_media,ig_android_async_stack_image_cache,ig_video_max_duration_qe_preuniverse,ig_video_copyright_whitelist,ig_android_render_stories_with_content_override,ig_android_ad_intent_to_highlight_universe,ig_android_swipe_navigation_x_angle_universe,ig_android_disable_comment_public_test,ig_android_profile,ig_android_direct_blue_tab,ig_android_enable_share_to_messenger,ig_android_fetch_reel_tray_on_resume_universe,ig_android_promote_again,ig_feed_event_landing_page_channel,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_pending_edits_dialog_universe,ig_android_business_conversion_flow_universe,ig_android_show_your_story_when_empty_universe,ig_android_ad_drop_cookie_early,ig_android_app_start_config,ig_android_fix_ise_two_phase,ig_android_ppage_toggle_universe,ig_android_pbia_normal_weight_universe,ig_android_profanity_filter,ig_ios_su_activity_feed,ig_android_search,ig_android_boomerang_entry,ig_android_mute_story,ig_android_inline_gallery_universe,ig_android_ad_remove_one_tap_indicator_universe,ig_android_view_count_decouple_likes_universe,ig_android_contact_button_redesign_v2,ig_android_periodic_analytics_upload_v2,ig_android_send_direct_typing_indicator,ig_android_ad_holdout_16h2m1_universe,ig_android_react_native_comment_moderation_settings,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_immersive_viewer,ig_android_discover_people_icon,ig_android_profile_follow_back_button,is_android_feed_seen_state,ig_android_dense_feed_unit_cards,ig_android_drafts_video_universe,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_ad_remove_cta_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_ad_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_search_event_icon,ig_android_channels_home,ig_android_feed,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_video_cache_policy,ig_android_react_native_universe_kill_switch,ig_android_video_captions_universe,ig_android_follow_search_bar,ig_android_last_edits,ig_android_two_step_capture_flow,ig_android_video_download_logging,ig_android_share_link_to_whatsapp,ig_android_facebook_twitter_profile_photos,ig_android_swipeable_filters_blacklist,ig_android_ad_pbia_profile_tap_universe,ig_android_use_software_layer_for_kc_drawing_universe,ig_android_react_native_ota,ig_android_direct_mutually_exclusive_experiment_universe,ig_android_following_follower_social_context' - LOGIN_EXPERIMENTS = 'ig_android_reg_login_btn_active_state,ig_android_ci_opt_in_at_reg,ig_android_one_click_in_old_flow,ig_android_merge_fb_and_ci_friends_page,ig_android_non_fb_sso,ig_android_mandatory_full_name,ig_android_reg_enable_login_password_btn,ig_android_reg_phone_email_active_state,ig_android_analytics_data_loss,ig_fbns_blocked,ig_android_contact_point_triage,ig_android_reg_next_btn_active_state,ig_android_prefill_phone_number,ig_android_show_fb_social_context_in_nux,ig_android_one_tap_login_upsell,ig_fbns_push,ig_android_phoneid_sync_interval' + VERSION = '10.3.2' + IG_SIG_KEY = 'af0431ace409e957498c6050e2299baa829014a781905eef3fc94139151e5d38' + EXPERIMENTS = 'ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_report_and_hide,ig_android_new_browser,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_huawei_app_badging,ig_android_universe_video_production,ig_android_asus_app_badging,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_white_out_universe,ig_android_full_people_card_in_user_list,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_feed_pill,ig_android_profile_link_iab,ig_explore_v3_us_holdout,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_high_res_upload_2,ig_android_new_browser_pre_kitkat,ig_android_2fac,ig_android_grid_video_icon,ig_android_white_camera_universe,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_explore_people_feed_icon,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_search_null_state,ig_android_react_native_notification_setting,ig_android_ads_indicator_change_universe,ig_android_video_loading_behavior,ig_android_black_camera_tab,liger_instagram_android_univ,ig_explore_v3_internal,ig_android_direct_emoji_picker,ig_android_prefetch_explore_delay_time,ig_android_business_insights_qe,ig_android_direct_media_size,ig_android_enable_client_share,ig_android_promoted_posts,ig_android_app_badging_holdout,ig_android_ads_cta_universe,ig_android_mini_inbox_2,ig_android_feed_reshare_button_nux,ig_android_boomerang_feed_attribution,ig_android_fbinvite_qe,ig_fbns_shared,ig_android_direct_full_width_media,ig_android_hscroll_profile_chaining,ig_android_feed_unit_footer,ig_android_media_tighten_space,ig_android_private_follow_request,ig_android_inline_gallery_backoff_hours_universe,ig_android_direct_thread_ui_rewrite,ig_android_rendering_controls,ig_android_ads_full_width_cta_universe,ig_video_max_duration_qe_preuniverse,ig_android_prefetch_explore_expire_time,ig_timestamp_public_test,ig_android_profile,ig_android_dv2_consistent_http_realtime_response,ig_android_enable_share_to_messenger,ig_explore_v3,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_video_pause_logging_fix,ig_android_default_folder_to_camera,ig_android_video_stitching_7_23,ig_android_profanity_filter,ig_android_business_profile_qe,ig_android_search,ig_android_boomerang_entry,ig_android_inline_gallery_universe,ig_android_ads_overlay_design_universe,ig_android_options_app_invite,ig_android_view_count_decouple_likes_universe,ig_android_periodic_analytics_upload_v2,ig_android_feed_unit_hscroll_auto_advance,ig_peek_profile_photo_universe,ig_android_ads_holdout_universe,ig_android_prefetch_explore,ig_android_direct_bubble_icon,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_image_cache_multi_queue,ig_android_camera_nux,ig_android_immersive_viewer,ig_android_dense_feed_unit_cards,ig_android_sqlite_dev,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_direct_public_threads,ig_android_prefetch_venue_in_composer,ig_android_bigger_share_button,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_follow_search_bar,ig_android_last_edits,ig_android_video_download_logging,ig_android_ads_loop_count_universe,ig_android_swipeable_filters_blacklist,ig_android_boomerang_layout_white_out_universe,ig_android_ads_carousel_multi_row_universe,ig_android_mentions_invite_v2,ig_android_direct_mention_qe,ig_android_following_follower_social_context'; SIG_KEY_VERSION = '4' ANDROID_VERSION = 18 diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index df547c7..a556b9b 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -75,6 +75,48 @@ def __init__(self, username, password, debug=False, IGDataPath=None, truncatedDe self.setUser(username, password) + + def getUserLive(self, usernameId): + """ + https://i.instagram.com/api/v1/live/ + Get user story. + :type usernameId: str + :param usernameId: Username id + :return: User feed data + :raises: InstagramException + """ + # //feed/reels_tray/https://i.instagram.com/api/v1/ + + userFeed = self.http.request("feed/reels_tray/")[1] + + # ; + # "feed/live/")[1] + # "feed/user/"+str(usernameId)+"/reel_media/" + # + str(usernameId) + "/live/?rank_token=" + self.rank_token)[1] + + if userFeed['status'] != 'ok': + raise InstagramException(userFeed['message'] + "\n") + + return userFeed + + # Evil Funct + + def getUserStory(self, usernameId): + """ + + Get user story. + :type usernameId: str + :param usernameId: Username id + :return: User feed data + :raises: InstagramException + """ + userFeed = self.http.request("feed/user/" + str(usernameId) + "/story/?rank_token=" + self.rank_token)[1] + + if userFeed['status'] != 'ok': + raise InstagramException(userFeed['message'] + "\n") + + return userFeed + def setUser(self, username, password): """ Set the user. Manage multiple accounts. From b95165fb8bda36fe10652f706734ac6b39c56be5 Mon Sep 17 00:00:00 2001 From: Evil Date: Sat, 22 Apr 2017 23:13:33 +0200 Subject: [PATCH 02/28] added experiment login --- InstagramAPI/src/Constants.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/InstagramAPI/src/Constants.py b/InstagramAPI/src/Constants.py index 9a052a9..f24564b 100644 --- a/InstagramAPI/src/Constants.py +++ b/InstagramAPI/src/Constants.py @@ -1,13 +1,15 @@ -# /** -# * Constant declarations. -# */ - -class Constants: +class Constants(object): + """ + Constant declarations. + """ API_URL = 'https://i.instagram.com/api/v1/' VERSION = '10.3.2' IG_SIG_KEY = 'af0431ace409e957498c6050e2299baa829014a781905eef3fc94139151e5d38' - EXPERIMENTS = 'ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_report_and_hide,ig_android_new_browser,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_huawei_app_badging,ig_android_universe_video_production,ig_android_asus_app_badging,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_white_out_universe,ig_android_full_people_card_in_user_list,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_feed_pill,ig_android_profile_link_iab,ig_explore_v3_us_holdout,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_high_res_upload_2,ig_android_new_browser_pre_kitkat,ig_android_2fac,ig_android_grid_video_icon,ig_android_white_camera_universe,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_explore_people_feed_icon,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_search_null_state,ig_android_react_native_notification_setting,ig_android_ads_indicator_change_universe,ig_android_video_loading_behavior,ig_android_black_camera_tab,liger_instagram_android_univ,ig_explore_v3_internal,ig_android_direct_emoji_picker,ig_android_prefetch_explore_delay_time,ig_android_business_insights_qe,ig_android_direct_media_size,ig_android_enable_client_share,ig_android_promoted_posts,ig_android_app_badging_holdout,ig_android_ads_cta_universe,ig_android_mini_inbox_2,ig_android_feed_reshare_button_nux,ig_android_boomerang_feed_attribution,ig_android_fbinvite_qe,ig_fbns_shared,ig_android_direct_full_width_media,ig_android_hscroll_profile_chaining,ig_android_feed_unit_footer,ig_android_media_tighten_space,ig_android_private_follow_request,ig_android_inline_gallery_backoff_hours_universe,ig_android_direct_thread_ui_rewrite,ig_android_rendering_controls,ig_android_ads_full_width_cta_universe,ig_video_max_duration_qe_preuniverse,ig_android_prefetch_explore_expire_time,ig_timestamp_public_test,ig_android_profile,ig_android_dv2_consistent_http_realtime_response,ig_android_enable_share_to_messenger,ig_explore_v3,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_video_pause_logging_fix,ig_android_default_folder_to_camera,ig_android_video_stitching_7_23,ig_android_profanity_filter,ig_android_business_profile_qe,ig_android_search,ig_android_boomerang_entry,ig_android_inline_gallery_universe,ig_android_ads_overlay_design_universe,ig_android_options_app_invite,ig_android_view_count_decouple_likes_universe,ig_android_periodic_analytics_upload_v2,ig_android_feed_unit_hscroll_auto_advance,ig_peek_profile_photo_universe,ig_android_ads_holdout_universe,ig_android_prefetch_explore,ig_android_direct_bubble_icon,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_image_cache_multi_queue,ig_android_camera_nux,ig_android_immersive_viewer,ig_android_dense_feed_unit_cards,ig_android_sqlite_dev,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_direct_public_threads,ig_android_prefetch_venue_in_composer,ig_android_bigger_share_button,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_follow_search_bar,ig_android_last_edits,ig_android_video_download_logging,ig_android_ads_loop_count_universe,ig_android_swipeable_filters_blacklist,ig_android_boomerang_layout_white_out_universe,ig_android_ads_carousel_multi_row_universe,ig_android_mentions_invite_v2,ig_android_direct_mention_qe,ig_android_following_follower_social_context'; + EXPERIMENTS = 'ig_android_ad_holdout_16m5_universe,ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_oppo_app_badging,ig_android_ad_remove_username_from_caption_universe,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_ad_always_send_ad_attribution_id_universe,ig_android_universe_video_production,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_video_playback_bandwidth_threshold,ig_android_direct_link_preview,ig_android_direct_typing_indicator,ig_android_preview_capture,ig_android_feed_pill,ig_android_profile_link_iab,ig_android_story_caption,ig_android_network_cancellation,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_follow_request_text_buttons,ig_android_feed_zoom,ig_android_drafts_universe,ig_android_disable_comment,ig_android_user_detail_endpoint,ig_android_os_version_blocking,ig_android_blocked_list,ig_android_event_creation,ig_android_high_res_upload_2,ig_android_2fac,ig_android_mark_reel_seen_on_Swipe_forward,ig_android_comment_redesign,ig_android_ad_sponsored_label_universe,ig_android_mentions_dismiss_rule,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_video_reuse_surface,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_insta_video_universe,ig_android_search_null_state,ig_android_universe_reel_video_production,liger_instagram_android_univ,ig_android_direct_emoji_picker,ig_feed_holdout_universe,ig_android_direct_send_auto_retry_universe,ig_android_samsung_app_badging,ig_android_disk_usage,ig_android_business_promotion,ig_android_direct_swipe_to_inbox,ig_android_feed_reshare_button_nux,ig_android_react_native_boost_post,ig_android_boomerang_feed_attribution,ig_fbns_shared,ig_fbns_dump_ids,ig_android_react_native_universe,ig_show_promote_button_in_feed,ig_android_ad_metadata_behavior_universe,ig_android_video_loopcount_int,ig_android_inline_gallery_backoff_hours_universe,ig_android_rendering_controls,ig_android_profile_photo_as_media,ig_android_async_stack_image_cache,ig_video_max_duration_qe_preuniverse,ig_video_copyright_whitelist,ig_android_render_stories_with_content_override,ig_android_ad_intent_to_highlight_universe,ig_android_swipe_navigation_x_angle_universe,ig_android_disable_comment_public_test,ig_android_profile,ig_android_direct_blue_tab,ig_android_enable_share_to_messenger,ig_android_fetch_reel_tray_on_resume_universe,ig_android_promote_again,ig_feed_event_landing_page_channel,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_pending_edits_dialog_universe,ig_android_business_conversion_flow_universe,ig_android_show_your_story_when_empty_universe,ig_android_ad_drop_cookie_early,ig_android_app_start_config,ig_android_fix_ise_two_phase,ig_android_ppage_toggle_universe,ig_android_pbia_normal_weight_universe,ig_android_profanity_filter,ig_ios_su_activity_feed,ig_android_search,ig_android_boomerang_entry,ig_android_mute_story,ig_android_inline_gallery_universe,ig_android_ad_remove_one_tap_indicator_universe,ig_android_view_count_decouple_likes_universe,ig_android_contact_button_redesign_v2,ig_android_periodic_analytics_upload_v2,ig_android_send_direct_typing_indicator,ig_android_ad_holdout_16h2m1_universe,ig_android_react_native_comment_moderation_settings,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_immersive_viewer,ig_android_discover_people_icon,ig_android_profile_follow_back_button,is_android_feed_seen_state,ig_android_dense_feed_unit_cards,ig_android_drafts_video_universe,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_ad_remove_cta_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_ad_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_search_event_icon,ig_android_channels_home,ig_android_feed,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_video_cache_policy,ig_android_react_native_universe_kill_switch,ig_android_video_captions_universe,ig_android_follow_search_bar,ig_android_last_edits,ig_android_two_step_capture_flow,ig_android_video_download_logging,ig_android_share_link_to_whatsapp,ig_android_facebook_twitter_profile_photos,ig_android_swipeable_filters_blacklist,ig_android_ad_pbia_profile_tap_universe,ig_android_use_software_layer_for_kc_drawing_universe,ig_android_react_native_ota,ig_android_direct_mutually_exclusive_experiment_universe,ig_android_following_follower_social_context' + LOGIN_EXPERIMENTS = 'ig_android_reg_login_btn_active_state,ig_android_ci_opt_in_at_reg,ig_android_one_click_in_old_flow,ig_android_merge_fb_and_ci_friends_page,ig_android_non_fb_sso,ig_android_mandatory_full_name,ig_android_reg_enable_login_password_btn,ig_android_reg_phone_email_active_state,ig_android_analytics_data_loss,ig_fbns_blocked,ig_android_contact_point_triage,ig_android_reg_next_btn_active_state,ig_android_prefill_phone_number,ig_android_show_fb_social_context_in_nux,ig_android_one_tap_login_upsell,ig_fbns_push,ig_android_phoneid_sync_interval' SIG_KEY_VERSION = '4' ANDROID_VERSION = 18 ANDROID_RELEASE = '4.3' + + From 445f6fadbe81869cd1dca8358b8e8c18c6b9375d Mon Sep 17 00:00:00 2001 From: Evil Date: Sat, 22 Apr 2017 23:17:51 +0200 Subject: [PATCH 03/28] Update version and key --- InstagramAPI/src/Constants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/Constants.py b/InstagramAPI/src/Constants.py index f24564b..e2ffbb9 100644 --- a/InstagramAPI/src/Constants.py +++ b/InstagramAPI/src/Constants.py @@ -3,8 +3,8 @@ class Constants(object): Constant declarations. """ API_URL = 'https://i.instagram.com/api/v1/' - VERSION = '10.3.2' - IG_SIG_KEY = 'af0431ace409e957498c6050e2299baa829014a781905eef3fc94139151e5d38' + VERSION = '10.15.0' + IG_SIG_KEY = 'b03e0daaf2ab17cda2a569cace938d639d1288a1197f9ecf97efd0a4ec0874d7' EXPERIMENTS = 'ig_android_ad_holdout_16m5_universe,ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_oppo_app_badging,ig_android_ad_remove_username_from_caption_universe,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_ad_always_send_ad_attribution_id_universe,ig_android_universe_video_production,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_video_playback_bandwidth_threshold,ig_android_direct_link_preview,ig_android_direct_typing_indicator,ig_android_preview_capture,ig_android_feed_pill,ig_android_profile_link_iab,ig_android_story_caption,ig_android_network_cancellation,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_follow_request_text_buttons,ig_android_feed_zoom,ig_android_drafts_universe,ig_android_disable_comment,ig_android_user_detail_endpoint,ig_android_os_version_blocking,ig_android_blocked_list,ig_android_event_creation,ig_android_high_res_upload_2,ig_android_2fac,ig_android_mark_reel_seen_on_Swipe_forward,ig_android_comment_redesign,ig_android_ad_sponsored_label_universe,ig_android_mentions_dismiss_rule,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_video_reuse_surface,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_insta_video_universe,ig_android_search_null_state,ig_android_universe_reel_video_production,liger_instagram_android_univ,ig_android_direct_emoji_picker,ig_feed_holdout_universe,ig_android_direct_send_auto_retry_universe,ig_android_samsung_app_badging,ig_android_disk_usage,ig_android_business_promotion,ig_android_direct_swipe_to_inbox,ig_android_feed_reshare_button_nux,ig_android_react_native_boost_post,ig_android_boomerang_feed_attribution,ig_fbns_shared,ig_fbns_dump_ids,ig_android_react_native_universe,ig_show_promote_button_in_feed,ig_android_ad_metadata_behavior_universe,ig_android_video_loopcount_int,ig_android_inline_gallery_backoff_hours_universe,ig_android_rendering_controls,ig_android_profile_photo_as_media,ig_android_async_stack_image_cache,ig_video_max_duration_qe_preuniverse,ig_video_copyright_whitelist,ig_android_render_stories_with_content_override,ig_android_ad_intent_to_highlight_universe,ig_android_swipe_navigation_x_angle_universe,ig_android_disable_comment_public_test,ig_android_profile,ig_android_direct_blue_tab,ig_android_enable_share_to_messenger,ig_android_fetch_reel_tray_on_resume_universe,ig_android_promote_again,ig_feed_event_landing_page_channel,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_pending_edits_dialog_universe,ig_android_business_conversion_flow_universe,ig_android_show_your_story_when_empty_universe,ig_android_ad_drop_cookie_early,ig_android_app_start_config,ig_android_fix_ise_two_phase,ig_android_ppage_toggle_universe,ig_android_pbia_normal_weight_universe,ig_android_profanity_filter,ig_ios_su_activity_feed,ig_android_search,ig_android_boomerang_entry,ig_android_mute_story,ig_android_inline_gallery_universe,ig_android_ad_remove_one_tap_indicator_universe,ig_android_view_count_decouple_likes_universe,ig_android_contact_button_redesign_v2,ig_android_periodic_analytics_upload_v2,ig_android_send_direct_typing_indicator,ig_android_ad_holdout_16h2m1_universe,ig_android_react_native_comment_moderation_settings,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_immersive_viewer,ig_android_discover_people_icon,ig_android_profile_follow_back_button,is_android_feed_seen_state,ig_android_dense_feed_unit_cards,ig_android_drafts_video_universe,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_ad_remove_cta_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_ad_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_search_event_icon,ig_android_channels_home,ig_android_feed,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_video_cache_policy,ig_android_react_native_universe_kill_switch,ig_android_video_captions_universe,ig_android_follow_search_bar,ig_android_last_edits,ig_android_two_step_capture_flow,ig_android_video_download_logging,ig_android_share_link_to_whatsapp,ig_android_facebook_twitter_profile_photos,ig_android_swipeable_filters_blacklist,ig_android_ad_pbia_profile_tap_universe,ig_android_use_software_layer_for_kc_drawing_universe,ig_android_react_native_ota,ig_android_direct_mutually_exclusive_experiment_universe,ig_android_following_follower_social_context' LOGIN_EXPERIMENTS = 'ig_android_reg_login_btn_active_state,ig_android_ci_opt_in_at_reg,ig_android_one_click_in_old_flow,ig_android_merge_fb_and_ci_friends_page,ig_android_non_fb_sso,ig_android_mandatory_full_name,ig_android_reg_enable_login_password_btn,ig_android_reg_phone_email_active_state,ig_android_analytics_data_loss,ig_fbns_blocked,ig_android_contact_point_triage,ig_android_reg_next_btn_active_state,ig_android_prefill_phone_number,ig_android_show_fb_social_context_in_nux,ig_android_one_tap_login_upsell,ig_fbns_push,ig_android_phoneid_sync_interval' SIG_KEY_VERSION = '4' From ba3ccbbf270fdcb36d98b3bdf4821999ef4d1887 Mon Sep 17 00:00:00 2001 From: Evil Date: Sat, 22 Apr 2017 23:56:08 +0200 Subject: [PATCH 04/28] fix feeduser --- InstagramAPI/src/Instagram.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index a556b9b..be523a2 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -1196,7 +1196,7 @@ def getReelsTrayFeed(self): return feed def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): - """ + """ Get user feed. :type usernameId: str :param usernameId: Username id @@ -1208,17 +1208,17 @@ def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): :return: User feed data :raises: InstagramException """ - userFeed = UserFeedResponse(self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token - + (("&max_id=" + str(maxid)) if maxid is not None else '') \ - + (("&min_timestamp=" + str( - minTimestamp)) if minTimestamp is not None else '') \ - + "&ranked_content=true" - )[1]) + userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + + (("&max_id=" + str(maxid)) if maxid is not None else '') \ + + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') \ + + "&ranked_content=true" + )[1] - if not userFeed.isOk(): - raise InstagramException(userFeed.getMessage() + "\n") + if userFeed['status'] != 'ok': + raise InstagramException(userFeed['message'] + "\n") return userFeed + def getHashtagFeed(self, hashtagString, maxid=''): """ From bf48a8a32ab9f8bc78fbf151a71d6b42d8eed228 Mon Sep 17 00:00:00 2001 From: Evil Date: Sun, 23 Apr 2017 00:02:39 +0200 Subject: [PATCH 05/28] :P --- InstagramAPI/src/Instagram.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index be523a2..3b6d3ba 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -1208,17 +1208,15 @@ def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): :return: User feed data :raises: InstagramException """ - userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token - + (("&max_id=" + str(maxid)) if maxid is not None else '') \ + userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + (("&max_id=" + str(maxid)) if maxid is not None else '') \ + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') \ - + "&ranked_content=true" - )[1] + + "&ranked_content=true")[1] if userFeed['status'] != 'ok': raise InstagramException(userFeed['message'] + "\n") return userFeed - + def getHashtagFeed(self, hashtagString, maxid=''): """ From c211c77da25d3526eeed10b67107dbae697573ee Mon Sep 17 00:00:00 2001 From: Evil Date: Sun, 23 Apr 2017 00:11:39 +0200 Subject: [PATCH 06/28] fix indentation --- InstagramAPI/src/Instagram.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 3b6d3ba..ed5fe17 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -1208,9 +1208,7 @@ def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): :return: User feed data :raises: InstagramException """ - userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + (("&max_id=" + str(maxid)) if maxid is not None else '') \ - + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') \ - + "&ranked_content=true")[1] + userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + (("&max_id=" + str(maxid)) if maxid is not None else '') + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') + "&ranked_content=true")[1] if userFeed['status'] != 'ok': raise InstagramException(userFeed['message'] + "\n") From c8a48d56432ff46b0d4bb4a8e8884d41d11f8b32 Mon Sep 17 00:00:00 2001 From: Evil Date: Sun, 23 Apr 2017 00:14:38 +0200 Subject: [PATCH 07/28] Fix --- InstagramAPI/src/Instagram.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index ed5fe17..737a8fd 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -1196,7 +1196,7 @@ def getReelsTrayFeed(self): return feed def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): - """ + """ Get user feed. :type usernameId: str :param usernameId: Username id @@ -1208,6 +1208,7 @@ def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): :return: User feed data :raises: InstagramException """ + userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + (("&max_id=" + str(maxid)) if maxid is not None else '') + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') + "&ranked_content=true")[1] if userFeed['status'] != 'ok': From 4429a6dcbb44570956c40b0e3f3ce962627c504e Mon Sep 17 00:00:00 2001 From: Evil Date: Sun, 23 Apr 2017 00:16:03 +0200 Subject: [PATCH 08/28] ++ --- InstagramAPI/src/Instagram.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 737a8fd..81e46f8 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -1208,8 +1208,11 @@ def getUserFeed(self, usernameId, maxid=None, minTimestamp=None): :return: User feed data :raises: InstagramException """ - - userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + (("&max_id=" + str(maxid)) if maxid is not None else '') + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') + "&ranked_content=true")[1] + userFeed = self.http.request("feed/user/" + str(usernameId) + "/?rank_token=" + self.rank_token + + (("&max_id=" + str(maxid)) if maxid is not None else '') \ + + (("&minTimestamp=" + str(minTimestamp)) if minTimestamp is not None else '') \ + + "&ranked_content=true" + )[1] if userFeed['status'] != 'ok': raise InstagramException(userFeed['message'] + "\n") From 9826f939a0d0d4fa914b8478ec02b03bdd0c51e2 Mon Sep 17 00:00:00 2001 From: Evil Date: Sun, 23 Apr 2017 03:43:44 +0200 Subject: [PATCH 09/28] fix image width --- InstagramAPI/src/http/Response/Objects/Item.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/http/Response/Objects/Item.py b/InstagramAPI/src/http/Response/Objects/Item.py index 2765c1c..c8585fa 100644 --- a/InstagramAPI/src/http/Response/Objects/Item.py +++ b/InstagramAPI/src/http/Response/Objects/Item.py @@ -64,8 +64,12 @@ def __init__(self, item): images.append(HdProfilePicUrlInfo(image)) self.image_versions2 = images - self.original_width = item['original_width'] - self.original_height = item['original_height'] + + if 'original_width' in item: + self.original_width = item['original_width'] + if 'original_height' in item: + self.original_height = item['original_height'] + if 'view_count' in item and item['view_count']: self.view_count = item['view_count'] From bbd9b8bd4088e46898a0cc355bd5522afa06bb79 Mon Sep 17 00:00:00 2001 From: Evil Date: Sun, 23 Apr 2017 03:55:30 +0200 Subject: [PATCH 10/28] remove id from get live --- InstagramAPI/src/Instagram.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 81e46f8..d702f1e 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -76,12 +76,10 @@ def __init__(self, username, password, debug=False, IGDataPath=None, truncatedDe self.setUser(username, password) - def getUserLive(self, usernameId): + def getUserLive(self): """ https://i.instagram.com/api/v1/live/ - Get user story. - :type usernameId: str - :param usernameId: Username id + Get user reels. :return: User feed data :raises: InstagramException """ From f813ed3089a80b17f10af19d1d26660a25451b24 Mon Sep 17 00:00:00 2001 From: Evil Date: Sat, 24 Jun 2017 21:45:32 +0200 Subject: [PATCH 11/28] :D --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c742412..e7baaf5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -*Please go through the [contribution guidelines](https://github.com/danleyb2/Instagram-API/blob/master/.github/CONTRIBUTING.md)*, +*Please go through the [contribution guidelines](https://github.com/danleyb2/Instagram-API/blob/master/.github/CONTRIBUTING.md)*, *just a translated Python implementation of this PHP [repository](https://github.com/mgp25/Instagram-API)* # ![logo](/examples/assets/instagram.png) Instagram Python [![License](https://poser.pugx.org/mgp25/instagram-php/license)](https://packagist.org/packages/mgp25/instagram-php) @@ -9,9 +9,9 @@ PYTHON [![Latest Stable Version](http://img.shields.io/pypi/v/instagram-python.s -This is Instagram's private API. It has all the features the Instagram app has, including media upload. +This is Instagram's private API. It has all the features the Instagram app has, including media upload. NEW -**Read the [wiki](https://github.com/danleyb2/Instagram-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. +**Read the [wiki](https://github.com/danleyb2/Instagram-API/wiki)** and previous issues before opening a new one! Maybe your issue is already answered. **Wiki for the PHP code should be 90% applicable too because the code is just translated, not transformed** **Frequently Asked Questions:** [F.A.Q.](https://github.com/danleyb2/Instagram-API/wiki/FAQ) @@ -45,9 +45,9 @@ pip install https://github.com/danleyb2/Instagram-API/archive/master.zip All examples can be found [here](https://github.com/danleyb2/Instagram-API/tree/master/examples) ## Why did i do the API? -For me, -*i love writing code*, -for him +For me, +*i love writing code*, +for him *After legal measures, Facebook, WhatsApp and Instagram blocked my accounts. In order to use Instagram on my phone i needed a new phone, as they banned my UDID, so that is basically why i made this API.* From c8cd036e0da6d9664a2b9eb808d456fe8ac60ab0 Mon Sep 17 00:00:00 2001 From: Evil Date: Sat, 24 Jun 2017 22:04:18 +0200 Subject: [PATCH 12/28] :D --- InstagramAPI/src/http/Response/V2InboxResponse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index e17182d..b925ed6 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -9,7 +9,7 @@ def __init__(self, response): self.pending_requests_users = None self.inbox = None self.subscription = None - + print self if self.STATUS_OK == response['status']: self.pending_requests_total = response['pending_requests_total'] self.seq_id = response['seq_id'] From eaea0954b7204f037d2b54c66a83e44a0316b25c Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:12:50 +0200 Subject: [PATCH 13/28] test --- InstagramAPI/src/http/Response/V2InboxResponse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index b925ed6..52834c3 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -9,7 +9,7 @@ def __init__(self, response): self.pending_requests_users = None self.inbox = None self.subscription = None - print self + dir (self) if self.STATUS_OK == response['status']: self.pending_requests_total = response['pending_requests_total'] self.seq_id = response['seq_id'] From 18903c86654561723783eef52cb14ba1497ba6d8 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:15:18 +0200 Subject: [PATCH 14/28] Response test --- InstagramAPI/src/http/Response/V2InboxResponse.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index 52834c3..d07d348 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -9,16 +9,15 @@ def __init__(self, response): self.pending_requests_users = None self.inbox = None self.subscription = None - dir (self) if self.STATUS_OK == response['status']: self.pending_requests_total = response['pending_requests_total'] self.seq_id = response['seq_id'] self.pending_requests_users = response['pending_requests_users'] self.inbox = Inbox(response['inbox']) + print response['subscription'] self.subscription = response['subscription'] else: self.setMessage(response['message']) - self.setStatus(response['status']) def getPendingRequestsTotal(self): From cbee57bba2c84537e8af00fc7846150a98ce9c67 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:16:50 +0200 Subject: [PATCH 15/28] test --- InstagramAPI/src/http/Response/V2InboxResponse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index d07d348..153c42d 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -14,7 +14,8 @@ def __init__(self, response): self.seq_id = response['seq_id'] self.pending_requests_users = response['pending_requests_users'] self.inbox = Inbox(response['inbox']) - print response['subscription'] + print response + dir response self.subscription = response['subscription'] else: self.setMessage(response['message']) From 5ecfba6c3ca23c007dfc334e3a31f31aae0121db Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:18:08 +0200 Subject: [PATCH 16/28] Test --- InstagramAPI/src/http/Response/V2InboxResponse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index 153c42d..8df89e3 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -15,7 +15,7 @@ def __init__(self, response): self.pending_requests_users = response['pending_requests_users'] self.inbox = Inbox(response['inbox']) print response - dir response + dir (response) self.subscription = response['subscription'] else: self.setMessage(response['message']) From 9074a48003593597df72c4436d12bef67279c2e4 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:20:54 +0200 Subject: [PATCH 17/28] New test --- InstagramAPI/src/http/Response/V2InboxResponse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index 8df89e3..0f25797 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -14,8 +14,8 @@ def __init__(self, response): self.seq_id = response['seq_id'] self.pending_requests_users = response['pending_requests_users'] self.inbox = Inbox(response['inbox']) - print response - dir (response) + + print dir (response) self.subscription = response['subscription'] else: self.setMessage(response['message']) From 9c87555c88341d1e98ebcf73f1b6844924e69b19 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:22:29 +0200 Subject: [PATCH 18/28] Remove subscriptions --- InstagramAPI/src/http/Response/V2InboxResponse.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index 0f25797..2894a9f 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -14,9 +14,7 @@ def __init__(self, response): self.seq_id = response['seq_id'] self.pending_requests_users = response['pending_requests_users'] self.inbox = Inbox(response['inbox']) - - print dir (response) - self.subscription = response['subscription'] + #self.subscription = response['subscription'] else: self.setMessage(response['message']) self.setStatus(response['status']) From 1843a146cd509e5b3e90081353f7038d98fab521 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:29:41 +0200 Subject: [PATCH 19/28] Add readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e7baaf5..80b5f07 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ This is Instagram's private API. It has all the features the Instagram app has, ### PYPI +This is unofficial fork from danleyb2/Instagram-API + ```sh pip install instagram-python ``` @@ -37,7 +39,13 @@ instagram = Instagram(); If you want to test code that is in the master branch, which hasn't been pushed as a release, you can use Github. ```sh -pip install https://github.com/danleyb2/Instagram-API/archive/master.zip +pip install https://github.com/EvilTatur/Instagram-API/archive/master.zip +``` + +for upgrade: + +```sh +pip install https://github.com/EvilTatur/Instagram-API/archive/master.zip --upgrade ``` ## Examples From a286b5c124f83af40836d85910728c38065f962d Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sat, 24 Jun 2017 22:36:09 +0200 Subject: [PATCH 20/28] added updated install command (pip) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 80b5f07..16ca8d5 100644 --- a/README.md +++ b/README.md @@ -39,13 +39,13 @@ instagram = Instagram(); If you want to test code that is in the master branch, which hasn't been pushed as a release, you can use Github. ```sh -pip install https://github.com/EvilTatur/Instagram-API/archive/master.zip +pip install https://github.com/EvilTatur/Instagram-API/archive/master.zip ``` for upgrade: ```sh -pip install https://github.com/EvilTatur/Instagram-API/archive/master.zip --upgrade +pip install https://github.com/EvilTatur/Instagram-API/archive/master.zip --upgrade ``` ## Examples From 01af951e2f6e622d1b42e589b49a683d90f68455 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Thu, 3 Aug 2017 09:40:51 +0200 Subject: [PATCH 21/28] update key --- InstagramAPI/src/Constants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/Constants.py b/InstagramAPI/src/Constants.py index e2ffbb9..16bea07 100644 --- a/InstagramAPI/src/Constants.py +++ b/InstagramAPI/src/Constants.py @@ -1,10 +1,11 @@ class Constants(object): """ Constant declarations. + https://github.com/mgp25/Instagram-API/blob/master/src/Constants.php """ API_URL = 'https://i.instagram.com/api/v1/' - VERSION = '10.15.0' - IG_SIG_KEY = 'b03e0daaf2ab17cda2a569cace938d639d1288a1197f9ecf97efd0a4ec0874d7' + VERSION = '10.26.0' + IG_SIG_KEY = '4f8732eb9ba7d1c8e8897a75d6474d4eb3f5279137431b2aafb71fafe2abe178' EXPERIMENTS = 'ig_android_ad_holdout_16m5_universe,ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_oppo_app_badging,ig_android_ad_remove_username_from_caption_universe,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_ad_always_send_ad_attribution_id_universe,ig_android_universe_video_production,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_video_playback_bandwidth_threshold,ig_android_direct_link_preview,ig_android_direct_typing_indicator,ig_android_preview_capture,ig_android_feed_pill,ig_android_profile_link_iab,ig_android_story_caption,ig_android_network_cancellation,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_follow_request_text_buttons,ig_android_feed_zoom,ig_android_drafts_universe,ig_android_disable_comment,ig_android_user_detail_endpoint,ig_android_os_version_blocking,ig_android_blocked_list,ig_android_event_creation,ig_android_high_res_upload_2,ig_android_2fac,ig_android_mark_reel_seen_on_Swipe_forward,ig_android_comment_redesign,ig_android_ad_sponsored_label_universe,ig_android_mentions_dismiss_rule,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_video_reuse_surface,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_insta_video_universe,ig_android_search_null_state,ig_android_universe_reel_video_production,liger_instagram_android_univ,ig_android_direct_emoji_picker,ig_feed_holdout_universe,ig_android_direct_send_auto_retry_universe,ig_android_samsung_app_badging,ig_android_disk_usage,ig_android_business_promotion,ig_android_direct_swipe_to_inbox,ig_android_feed_reshare_button_nux,ig_android_react_native_boost_post,ig_android_boomerang_feed_attribution,ig_fbns_shared,ig_fbns_dump_ids,ig_android_react_native_universe,ig_show_promote_button_in_feed,ig_android_ad_metadata_behavior_universe,ig_android_video_loopcount_int,ig_android_inline_gallery_backoff_hours_universe,ig_android_rendering_controls,ig_android_profile_photo_as_media,ig_android_async_stack_image_cache,ig_video_max_duration_qe_preuniverse,ig_video_copyright_whitelist,ig_android_render_stories_with_content_override,ig_android_ad_intent_to_highlight_universe,ig_android_swipe_navigation_x_angle_universe,ig_android_disable_comment_public_test,ig_android_profile,ig_android_direct_blue_tab,ig_android_enable_share_to_messenger,ig_android_fetch_reel_tray_on_resume_universe,ig_android_promote_again,ig_feed_event_landing_page_channel,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_pending_edits_dialog_universe,ig_android_business_conversion_flow_universe,ig_android_show_your_story_when_empty_universe,ig_android_ad_drop_cookie_early,ig_android_app_start_config,ig_android_fix_ise_two_phase,ig_android_ppage_toggle_universe,ig_android_pbia_normal_weight_universe,ig_android_profanity_filter,ig_ios_su_activity_feed,ig_android_search,ig_android_boomerang_entry,ig_android_mute_story,ig_android_inline_gallery_universe,ig_android_ad_remove_one_tap_indicator_universe,ig_android_view_count_decouple_likes_universe,ig_android_contact_button_redesign_v2,ig_android_periodic_analytics_upload_v2,ig_android_send_direct_typing_indicator,ig_android_ad_holdout_16h2m1_universe,ig_android_react_native_comment_moderation_settings,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_immersive_viewer,ig_android_discover_people_icon,ig_android_profile_follow_back_button,is_android_feed_seen_state,ig_android_dense_feed_unit_cards,ig_android_drafts_video_universe,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_ad_remove_cta_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_ad_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_search_event_icon,ig_android_channels_home,ig_android_feed,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_video_cache_policy,ig_android_react_native_universe_kill_switch,ig_android_video_captions_universe,ig_android_follow_search_bar,ig_android_last_edits,ig_android_two_step_capture_flow,ig_android_video_download_logging,ig_android_share_link_to_whatsapp,ig_android_facebook_twitter_profile_photos,ig_android_swipeable_filters_blacklist,ig_android_ad_pbia_profile_tap_universe,ig_android_use_software_layer_for_kc_drawing_universe,ig_android_react_native_ota,ig_android_direct_mutually_exclusive_experiment_universe,ig_android_following_follower_social_context' LOGIN_EXPERIMENTS = 'ig_android_reg_login_btn_active_state,ig_android_ci_opt_in_at_reg,ig_android_one_click_in_old_flow,ig_android_merge_fb_and_ci_friends_page,ig_android_non_fb_sso,ig_android_mandatory_full_name,ig_android_reg_enable_login_password_btn,ig_android_reg_phone_email_active_state,ig_android_analytics_data_loss,ig_fbns_blocked,ig_android_contact_point_triage,ig_android_reg_next_btn_active_state,ig_android_prefill_phone_number,ig_android_show_fb_social_context_in_nux,ig_android_one_tap_login_upsell,ig_fbns_push,ig_android_phoneid_sync_interval' SIG_KEY_VERSION = '4' From c2cf85dee3f5a99bfb770b2f4137552d8fbfe0aa Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sun, 8 Oct 2017 02:07:08 +0200 Subject: [PATCH 22/28] Fix max id error --- InstagramAPI/src/Instagram.py | 4 ++-- InstagramAPI/src/http/Response/ExploreResponse.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index d702f1e..60fb55a 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -67,7 +67,7 @@ def __init__(self, username, password, debug=False, IGDataPath=None, truncatedDe '' ) if not os.path.isdir(self.IGDataPath): - os.mkdir(self.IGDataPath, 0o777) + os.mkdir(self.IGDataPath, 0777) self.checkSettings(username) @@ -79,7 +79,7 @@ def __init__(self, username, password, debug=False, IGDataPath=None, truncatedDe def getUserLive(self): """ https://i.instagram.com/api/v1/live/ - Get user reels. + Get user reels. :return: User feed data :raises: InstagramException """ diff --git a/InstagramAPI/src/http/Response/ExploreResponse.py b/InstagramAPI/src/http/Response/ExploreResponse.py index 3094a64..d1cb373 100644 --- a/InstagramAPI/src/http/Response/ExploreResponse.py +++ b/InstagramAPI/src/http/Response/ExploreResponse.py @@ -15,8 +15,10 @@ def __init__(self, response): self.num_results = response['num_results'] self.auto_load_more_enabled = response['auto_load_more_enabled'] self.more_available = response['more_available'] - self.next_max_id = response['next_max_id'] - self.max_id = response['max_id'] + if 'next_max_id' in response: + self.next_max_id = response['next_max_id'] + if 'max_id' in response: + self.max_id = response['max_id'] items = [] for item in response['items']: if 'media' in item and item['media']: From 15ed0831d046baa355dacc1e88b1ba94788e7635 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Sun, 15 Apr 2018 14:26:01 +0200 Subject: [PATCH 23/28] Remove pending_request_users --- InstagramAPI/src/http/Response/V2InboxResponse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InstagramAPI/src/http/Response/V2InboxResponse.py b/InstagramAPI/src/http/Response/V2InboxResponse.py index 2894a9f..a747dc5 100644 --- a/InstagramAPI/src/http/Response/V2InboxResponse.py +++ b/InstagramAPI/src/http/Response/V2InboxResponse.py @@ -12,7 +12,7 @@ def __init__(self, response): if self.STATUS_OK == response['status']: self.pending_requests_total = response['pending_requests_total'] self.seq_id = response['seq_id'] - self.pending_requests_users = response['pending_requests_users'] + #self.pending_requests_users = response['pending_requests_users'] self.inbox = Inbox(response['inbox']) #self.subscription = response['subscription'] else: From b30d1495405832f02e02ff51c1fca0455820df68 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Tue, 5 Jun 2018 20:29:47 +0200 Subject: [PATCH 24/28] Remove --- InstagramAPI/src/Instagram.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 60fb55a..63db4be 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -253,10 +253,10 @@ def login(self, force=False): self.syncFeatures() self.autoCompleteUserList() self.timelineFeed() - self.getRankedRecipients() - self.getRecentRecipients() + #self.getRankedRecipients() + #self.getRecentRecipients() self.megaphoneLog() - self.getv2Inbox() + #self.getv2Inbox() self.getRecentActivity() self.getReelsTrayFeed() self.explore() From aca63bccab1aba9f3dd6f3aa005ce72250980708 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Tue, 5 Jun 2018 20:31:49 +0200 Subject: [PATCH 25/28] Remove ranked --- InstagramAPI/src/Instagram.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 63db4be..6b681f8 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -255,7 +255,7 @@ def login(self, force=False): self.timelineFeed() #self.getRankedRecipients() #self.getRecentRecipients() - self.megaphoneLog() + #self.megaphoneLog() #self.getv2Inbox() self.getRecentActivity() self.getReelsTrayFeed() @@ -270,12 +270,12 @@ def login(self, force=False): self.autoCompleteUserList() self.getReelsTrayFeed() - self.getRankedRecipients() + #self.getRankedRecipients() # push register - self.getRecentRecipients() + #self.getRecentRecipients() # push register self.megaphoneLog() - self.getv2Inbox() + #self.getv2Inbox() self.getRecentActivity() self.explore() From 520c8fe70bf63017ed9cae1f0def558c4f4907aa Mon Sep 17 00:00:00 2001 From: eviltatur Date: Tue, 5 Jun 2018 20:35:04 +0200 Subject: [PATCH 26/28] Remove explore function --- InstagramAPI/src/Instagram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 6b681f8..3b3293c 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -259,7 +259,7 @@ def login(self, force=False): #self.getv2Inbox() self.getRecentActivity() self.getReelsTrayFeed() - self.explore() + #self.explore() return response @@ -277,7 +277,7 @@ def login(self, force=False): self.megaphoneLog() #self.getv2Inbox() self.getRecentActivity() - self.explore() + #self.explore() def syncFeatures(self, prelogin=False): if prelogin: From 33c9204212c380b25d15065c956b625b17bf9418 Mon Sep 17 00:00:00 2001 From: eviltatur Date: Tue, 5 Jun 2018 21:43:31 +0200 Subject: [PATCH 27/28] T --- InstagramAPI/src/Instagram.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/InstagramAPI/src/Instagram.py b/InstagramAPI/src/Instagram.py index 3b3293c..a454317 100644 --- a/InstagramAPI/src/Instagram.py +++ b/InstagramAPI/src/Instagram.py @@ -253,13 +253,13 @@ def login(self, force=False): self.syncFeatures() self.autoCompleteUserList() self.timelineFeed() - #self.getRankedRecipients() - #self.getRecentRecipients() - #self.megaphoneLog() - #self.getv2Inbox() + self.getRankedRecipients() + self.getRecentRecipients() + self.megaphoneLog() + self.getv2Inbox() self.getRecentActivity() self.getReelsTrayFeed() - #self.explore() + self.explore() return response @@ -270,14 +270,14 @@ def login(self, force=False): self.autoCompleteUserList() self.getReelsTrayFeed() - #self.getRankedRecipients() + self.getRankedRecipients() # push register - #self.getRecentRecipients() + self.getRecentRecipients() # push register self.megaphoneLog() - #self.getv2Inbox() + self.getv2Inbox() self.getRecentActivity() - #self.explore() + self.explore() def syncFeatures(self, prelogin=False): if prelogin: @@ -367,6 +367,8 @@ def getRankedRecipients(self): :rtype:list :return: Ranked recipients Data """ + print self.http.request('direct_v2/ranked_recipients/?show_threads=true') + ranked_recipients = RankedRecipientsResponse( self.http.request('direct_v2/ranked_recipients/?show_threads=true')[1] ) From 652fa93485c2f231ef659848b531ae86c9996c0e Mon Sep 17 00:00:00 2001 From: eviltatur Date: Wed, 6 Jun 2018 23:48:17 +0200 Subject: [PATCH 28/28] new key --- InstagramAPI/src/Constants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/InstagramAPI/src/Constants.py b/InstagramAPI/src/Constants.py index 16bea07..65e7c72 100644 --- a/InstagramAPI/src/Constants.py +++ b/InstagramAPI/src/Constants.py @@ -4,8 +4,9 @@ class Constants(object): https://github.com/mgp25/Instagram-API/blob/master/src/Constants.php """ API_URL = 'https://i.instagram.com/api/v1/' - VERSION = '10.26.0' - IG_SIG_KEY = '4f8732eb9ba7d1c8e8897a75d6474d4eb3f5279137431b2aafb71fafe2abe178' + VERSION = '27.0.0.7.97' + + IG_SIG_KEY = '109513c04303341a7daf27bb41b268e633b30dcc65a3fe14503f743176113869' EXPERIMENTS = 'ig_android_ad_holdout_16m5_universe,ig_android_progressive_jpeg,ig_creation_growth_holdout,ig_android_oppo_app_badging,ig_android_ad_remove_username_from_caption_universe,ig_android_enable_share_to_whatsapp,ig_android_direct_drawing_in_quick_cam_universe,ig_android_ad_always_send_ad_attribution_id_universe,ig_android_universe_video_production,ig_android_direct_plus_button,ig_android_ads_heatmap_overlay_universe,ig_android_http_stack_experiment_2016,ig_android_infinite_scrolling,ig_fbns_blocked,ig_android_post_auto_retry_v7_21,ig_fbns_push,ig_android_video_playback_bandwidth_threshold,ig_android_direct_link_preview,ig_android_direct_typing_indicator,ig_android_preview_capture,ig_android_feed_pill,ig_android_profile_link_iab,ig_android_story_caption,ig_android_network_cancellation,ig_android_histogram_reporter,ig_android_anrwatchdog,ig_android_search_client_matching,ig_android_follow_request_text_buttons,ig_android_feed_zoom,ig_android_drafts_universe,ig_android_disable_comment,ig_android_user_detail_endpoint,ig_android_os_version_blocking,ig_android_blocked_list,ig_android_event_creation,ig_android_high_res_upload_2,ig_android_2fac,ig_android_mark_reel_seen_on_Swipe_forward,ig_android_comment_redesign,ig_android_ad_sponsored_label_universe,ig_android_mentions_dismiss_rule,ig_android_disable_chroma_subsampling,ig_android_share_spinner,ig_android_video_reuse_surface,ig_explore_v3_android_universe,ig_android_media_favorites,ig_android_nux_holdout,ig_android_insta_video_universe,ig_android_search_null_state,ig_android_universe_reel_video_production,liger_instagram_android_univ,ig_android_direct_emoji_picker,ig_feed_holdout_universe,ig_android_direct_send_auto_retry_universe,ig_android_samsung_app_badging,ig_android_disk_usage,ig_android_business_promotion,ig_android_direct_swipe_to_inbox,ig_android_feed_reshare_button_nux,ig_android_react_native_boost_post,ig_android_boomerang_feed_attribution,ig_fbns_shared,ig_fbns_dump_ids,ig_android_react_native_universe,ig_show_promote_button_in_feed,ig_android_ad_metadata_behavior_universe,ig_android_video_loopcount_int,ig_android_inline_gallery_backoff_hours_universe,ig_android_rendering_controls,ig_android_profile_photo_as_media,ig_android_async_stack_image_cache,ig_video_max_duration_qe_preuniverse,ig_video_copyright_whitelist,ig_android_render_stories_with_content_override,ig_android_ad_intent_to_highlight_universe,ig_android_swipe_navigation_x_angle_universe,ig_android_disable_comment_public_test,ig_android_profile,ig_android_direct_blue_tab,ig_android_enable_share_to_messenger,ig_android_fetch_reel_tray_on_resume_universe,ig_android_promote_again,ig_feed_event_landing_page_channel,ig_ranking_following,ig_android_pending_request_search_bar,ig_android_feed_ufi_redesign,ig_android_pending_edits_dialog_universe,ig_android_business_conversion_flow_universe,ig_android_show_your_story_when_empty_universe,ig_android_ad_drop_cookie_early,ig_android_app_start_config,ig_android_fix_ise_two_phase,ig_android_ppage_toggle_universe,ig_android_pbia_normal_weight_universe,ig_android_profanity_filter,ig_ios_su_activity_feed,ig_android_search,ig_android_boomerang_entry,ig_android_mute_story,ig_android_inline_gallery_universe,ig_android_ad_remove_one_tap_indicator_universe,ig_android_view_count_decouple_likes_universe,ig_android_contact_button_redesign_v2,ig_android_periodic_analytics_upload_v2,ig_android_send_direct_typing_indicator,ig_android_ad_holdout_16h2m1_universe,ig_android_react_native_comment_moderation_settings,ig_video_use_sve_universe,ig_android_inline_gallery_no_backoff_on_launch_universe,ig_android_immersive_viewer,ig_android_discover_people_icon,ig_android_profile_follow_back_button,is_android_feed_seen_state,ig_android_dense_feed_unit_cards,ig_android_drafts_video_universe,ig_android_exoplayer,ig_android_add_to_last_post,ig_android_ad_remove_cta_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_ad_chevron_universe,ig_android_ad_comment_cta_universe,ig_android_search_event_icon,ig_android_channels_home,ig_android_feed,ig_android_dv2_realtime_private_share,ig_android_non_square_first,ig_android_video_interleaved_v2,ig_android_video_cache_policy,ig_android_react_native_universe_kill_switch,ig_android_video_captions_universe,ig_android_follow_search_bar,ig_android_last_edits,ig_android_two_step_capture_flow,ig_android_video_download_logging,ig_android_share_link_to_whatsapp,ig_android_facebook_twitter_profile_photos,ig_android_swipeable_filters_blacklist,ig_android_ad_pbia_profile_tap_universe,ig_android_use_software_layer_for_kc_drawing_universe,ig_android_react_native_ota,ig_android_direct_mutually_exclusive_experiment_universe,ig_android_following_follower_social_context' LOGIN_EXPERIMENTS = 'ig_android_reg_login_btn_active_state,ig_android_ci_opt_in_at_reg,ig_android_one_click_in_old_flow,ig_android_merge_fb_and_ci_friends_page,ig_android_non_fb_sso,ig_android_mandatory_full_name,ig_android_reg_enable_login_password_btn,ig_android_reg_phone_email_active_state,ig_android_analytics_data_loss,ig_fbns_blocked,ig_android_contact_point_triage,ig_android_reg_next_btn_active_state,ig_android_prefill_phone_number,ig_android_show_fb_social_context_in_nux,ig_android_one_tap_login_upsell,ig_fbns_push,ig_android_phoneid_sync_interval' SIG_KEY_VERSION = '4'