InstaPy / InstaPy

📷 Instagram Bot - Tool for automated Instagram interactions
GNU General Public License v3.0
16.84k stars 3.78k forks source link

Error when trying to like/comment. #6582

Open Anima1337 opened 2 years ago

Anima1337 commented 2 years ago

Hey, InstaPy worked flawlessly the last weeks. Now it automatically updated and I get this message before it stops:

--- Logging error ---
Traceback (most recent call last):
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\logging\__init__.py", line 1082, in emit
    stream.write(msg + self.terminator)
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2728' in position 419: character maps to <undefined>
Call stack:
  File "C:\Users\xDDra\Downloads\instapy-quickstart-master\quickstart.py", line 124, in <module>
    session.like_by_tags(my_hashtags, amount=90, media=None)
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\site-packages\instapy\instapy.py", line 1977, in like_by_tags
    inappropriate, user_name, is_video, reason, scope = check_link(
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\site-packages\instapy\like_util.py", line 617, in check_link
    logger.info("post_page: {}".format(post_page))
Message: "post_page: {'items': [{'taken_at': 1649696640, 'pk': 2814181843960894852, 'id': '2814181843960894852_52135199895', 'device_timestamp': 216800212164278, 'media_type': 1, 'code': 'CcN-3oWpJWE', 'client_cache_key': 'MjgxNDE4MTg0Mzk2MDg5NDg1Mg==.2', 'filter_type': 0, 'is_unified_video': False, 'user': {'pk': 52135199895, 'username': 'skies_by_jie', 'full_name': 'Skies✨', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/275159678_635233907705714_3301720467448510435_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=TLWqsd_aLjEAX9ZS59D&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT95n96A9UqSUxqN3fF-sIjhk99P2OG4p3VixXOPeu01hQ&oe=625AEFBE&_nc_sid=83d603', 'profile_pic_id': '2786284984702872632_52135199895', 'friendship_status': {'following': False, 'outgoing_request': False, 'is_bestie': False, 'is_restricted': False, 'is_feed_favorite': False}, 'is_verified': False, 'follow_friction_type': 0, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': [], 'has_anonymous_profile_picture': False, 'is_unpublished': False, 'is_favorite': False, 'latest_reel_media': 0, 'has_highlight_reels': False, 'has_primary_country_in_feed': False, 'has_primary_country_in_profile': False}, 'can_viewer_reshare': True, 'caption_is_edited': False, 'like_and_view_counts_disabled': False, 'featured_products_cta': None, 'commerciality_status': 'not_commercial', 'is_paid_partnership': False, 'is_visual_reply_commenter_notice_enabled': True, 'original_media_has_visual_reply_media': False, 'comment_likes_enabled': True, 'comment_threading_enabled': True, 'has_more_comments': True, 'max_num_visible_preview_comments': 2, 'preview_comments': [], 'comments': [], 'can_view_more_preview_comments': False, 'comment_count': 2, 'hide_view_all_comment_entrypoint': False, 'inline_composer_display_condition': 'impression_trigger', 'image_versions2': {'candidates': [{'width': 1080, 'height': 1350, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?se=7&stp=dst-jpg_e35&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT9YHOYMpRy7iS3u59OWvVp3Nw9FZ85YtSrW2D1wijTWEg&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 828, 'height': 1035, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p828x828&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT-PB8Dn0u5FrZQnuNLgPIkbx4BwJ2hGPdBYurKK-Ph8CA&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 750, 'height': 938, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p750x750_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT8DADx9YCBehSADJEDfiac_7ZSDbIKu8mK4j1O3lp089g&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 640, 'height': 800, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p640x640_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT84V7TcbmFCXDSZ7qgCLV21pznsmVfbLJQY1mIlm3hQ2A&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 480, 'height': 600, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p480x480&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_vCyXKR-BrV39UGsCei3zcVyKgwtWbXNAJtoIFrCQfpA&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 320, 'height': 400, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p320x320&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_e0LD-l7sLXP3e6ljhCHYOfs_Y9fhmL1dsQiwzk3Zprw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 240, 'height': 300, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p240x240&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT-DCuE8FkvArFRaVPaUULvWNi8zhmixBzLdSyBHLfN_Og&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 1080, 'height': 1080, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?se=7&stp=c0.135.1080.1080a_dst-jpg_e35&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT9prjEpsYUD27seWjB-In5joY6vtuDPSe7tIV5ASU_Dbg&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 750, 'height': 750, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s750x750_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT-HBrE__-m8lI0d5t5PHe9MS1JkiyAlG_injTYqcHBXJw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 640, 'height': 640, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s640x640_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT9pfN-zELsoOcPL2Vz_VwmYF3hvP9NdvlQknoaUFJm1Ng&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 480, 'height': 480, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s480x480&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT8npxMz99PoM9fu-G2ysaFq58HCV59ya8epBZaGTWA2Lw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 320, 'height': 320, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s320x320&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT8mbX0-pk_2RpQTcXBpSbc1wmTv60Ix_tI08vM6ORGr9g&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 240, 'height': 240, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s240x240&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_ZiSiVnli3dZldFdn_ACyphgeF249l5-2uOeI_PCFxvw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 150, 'height': 150, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_Kc3SEihspeL1nI1n7jUoDxhz89JQcrTwKWh2D0Mnu4w&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}]}, 'original_width': 1080, 'original_height': 1350, 'like_count': 2, 'has_liked': False, 'top_likers': [], 'facepile_top_likers': [], 'likers': [{'pk': 40843950216, 'username': 'jangid_mahendra_0077', 'full_name': '', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/272044951_3151532145080890_8039253420465785801_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=110&_nc_ohc=e411HvH4F-4AX_2u7i0&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT8aYxaW8npTTA1HJ8EajgzYjMu-MFtfihLGCMuPPDl6bQ&oe=625A6D31&_nc_sid=83d603', 'profile_pic_id': '2753611017063197775_40843950216', 'is_verified': False, 'follow_friction_type': -1, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': []}, {'pk': 44931900829, 'username': 'frnd_jaan', 'full_name': 'jaanu🔵', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/277881792_407914971146773_4878599047040218559_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=101&_nc_ohc=3YZLxOWxrpAAX_0aSEv&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT88EqL1tpzupxLKyf0N5HamMTptt3PHtG8rmEn4Jx03vg&oe=625B856B&_nc_sid=83d603', 'profile_pic_id': '2810240202946905849_44931900829', 'is_verified': False, 'follow_friction_type': -1, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': []}], 'photo_of_you': False, 'is_organic_product_tagging_eligible': False, 'can_see_insights_as_brand': False, 'caption': {'pk': 17902493708485887, 'user_id': 52135199895, 'text': '#explorepage #sunsetphotography #sunset #samsunga20', 'type': 1, 'created_at': 1649696640, 'created_at_utc': 1649696640, 'content_type': 'comment', 'status': 'Active', 'bit_flags': 0, 'did_report_as_spam': False, 'share_enabled': False, 'user': {'pk': 52135199895, 'username': 'skies_by_jie', 'full_name': 'Skies✨', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/275159678_635233907705714_3301720467448510435_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=TLWqsd_aLjEAX9ZS59D&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT95n96A9UqSUxqN3fF-sIjhk99P2OG4p3VixXOPeu01hQ&oe=625AEFBE&_nc_sid=83d603', 'profile_pic_id': '2786284984702872632_52135199895', 'is_verified': False, 'follow_friction_type': -1, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': []}, 'is_covered': False, 'media_id': 2814181843960894852, 'private_reply_status': 0}, 'can_viewer_save': True, 'organic_tracking_token': 'eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiNjE4Mzg5MzA1MjA1NGY5Y2FmYmQ1MDI1M2IzOWJiNDcyODE0MTgxODQzOTYwODk0ODUyIiwic2VydmVyX3Rva2VuIjoiMTY0OTY5Njc0MDUxOHwyODE0MTgxODQzOTYwODk0ODUyfDE3OTU1MzUwMzF8NmRjNzlmMzFjMjczYmQ1Y2E1ZDZmN2M1MmRkMTdmNDQxMDBjYjBjMDNhZGY1MzkwYzk5ODM2ZjkzYWQzNGY4MSJ9LCJzaWduYXR1cmUiOiIifQ==', 'has_shared_to_fb': 0, 'sharing_friction_info': {'should_have_sharing_friction': False, 'bloks_app_url': None, 'sharing_friction_payload': None}, 'comment_inform_treatment': {'should_have_inform_treatment': False, 'text': '', 'url': None, 'action_type': None}, 'product_type': 'feed', 'is_in_profile_grid': False, 'profile_grid_control_enabled': False, 'deleted_reason': 0, 'integrity_review_decision': 'pending', 'music_metadata': {'music_canonical_id': '0', 'audio_type': None, 'music_info': None, 'original_sound_info': None}}], 'num_results': 1, 'more_available': False, 'auto_load_more_enabled': False}"
Arguments: ()
INFO [2022-04-11 19:05:42] [coldt_astrophotography]  post_page: {'items': [{'taken_at': 1649696640, 'pk': 2814181843960894852, 'id': '2814181843960894852_52135199895', 'device_timestamp': 216800212164278, 'media_type': 1, 'code': 'CcN-3oWpJWE', 'client_cache_key': 'MjgxNDE4MTg0Mzk2MDg5NDg1Mg==.2', 'filter_type': 0, 'is_unified_video': False, 'user': {'pk': 52135199895, 'username': 'skies_by_jie', 'full_name': 'Skies✨', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/275159678_635233907705714_3301720467448510435_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=TLWqsd_aLjEAX9ZS59D&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT95n96A9UqSUxqN3fF-sIjhk99P2OG4p3VixXOPeu01hQ&oe=625AEFBE&_nc_sid=83d603', 'profile_pic_id': '2786284984702872632_52135199895', 'friendship_status': {'following': False, 'outgoing_request': False, 'is_bestie': False, 'is_restricted': False, 'is_feed_favorite': False}, 'is_verified': False, 'follow_friction_type': 0, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': [], 'has_anonymous_profile_picture': False, 'is_unpublished': False, 'is_favorite': False, 'latest_reel_media': 0, 'has_highlight_reels': False, 'has_primary_country_in_feed': False, 'has_primary_country_in_profile': False}, 'can_viewer_reshare': True, 'caption_is_edited': False, 'like_and_view_counts_disabled': False, 'featured_products_cta': None, 'commerciality_status': 'not_commercial', 'is_paid_partnership': False, 'is_visual_reply_commenter_notice_enabled': True, 'original_media_has_visual_reply_media': False, 'comment_likes_enabled': True, 'comment_threading_enabled': True, 'has_more_comments': True, 'max_num_visible_preview_comments': 2, 'preview_comments': [], 'comments': [], 'can_view_more_preview_comments': False, 'comment_count': 2, 'hide_view_all_comment_entrypoint': False, 'inline_composer_display_condition': 'impression_trigger', 'image_versions2': {'candidates': [{'width': 1080, 'height': 1350, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?se=7&stp=dst-jpg_e35&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT9YHOYMpRy7iS3u59OWvVp3Nw9FZ85YtSrW2D1wijTWEg&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 828, 'height': 1035, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p828x828&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT-PB8Dn0u5FrZQnuNLgPIkbx4BwJ2hGPdBYurKK-Ph8CA&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 750, 'height': 938, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p750x750_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT8DADx9YCBehSADJEDfiac_7ZSDbIKu8mK4j1O3lp089g&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 640, 'height': 800, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p640x640_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT84V7TcbmFCXDSZ7qgCLV21pznsmVfbLJQY1mIlm3hQ2A&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 480, 'height': 600, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p480x480&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_vCyXKR-BrV39UGsCei3zcVyKgwtWbXNAJtoIFrCQfpA&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 320, 'height': 400, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p320x320&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_e0LD-l7sLXP3e6ljhCHYOfs_Y9fhmL1dsQiwzk3Zprw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 240, 'height': 300, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=dst-jpg_e35_p240x240&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT-DCuE8FkvArFRaVPaUULvWNi8zhmixBzLdSyBHLfN_Og&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 1080, 'height': 1080, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?se=7&stp=c0.135.1080.1080a_dst-jpg_e35&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT9prjEpsYUD27seWjB-In5joY6vtuDPSe7tIV5ASU_Dbg&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 750, 'height': 750, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s750x750_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT-HBrE__-m8lI0d5t5PHe9MS1JkiyAlG_injTYqcHBXJw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 640, 'height': 640, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s640x640_sh0.08&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT9pfN-zELsoOcPL2Vz_VwmYF3hvP9NdvlQknoaUFJm1Ng&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 480, 'height': 480, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s480x480&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT8npxMz99PoM9fu-G2ysaFq58HCV59ya8epBZaGTWA2Lw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 320, 'height': 320, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s320x320&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT8mbX0-pk_2RpQTcXBpSbc1wmTv60Ix_tI08vM6ORGr9g&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 240, 'height': 240, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s240x240&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_ZiSiVnli3dZldFdn_ACyphgeF249l5-2uOeI_PCFxvw&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}, {'width': 150, 'height': 150, 'url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-15/278165220_380496157267572_6465440574021271147_n.webp?stp=c0.135.1080.1080a_dst-jpg_e35_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=100&_nc_ohc=6pDaMzYBgwIAX_unUPj&edm=AABBvjUBAAAA&ccb=7-4&ig_cache_key=MjgxNDE4MTg0Mzk2MDg5NDg1Mg%3D%3D.2-ccb7-4&oh=00_AT_Kc3SEihspeL1nI1n7jUoDxhz89JQcrTwKWh2D0Mnu4w&oe=625BE0A0&_nc_sid=83d603', 'scans_profile': 'e35'}]}, 'original_width': 1080, 'original_height': 1350, 'like_count': 2, 'has_liked': False, 'top_likers': [], 'facepile_top_likers': [], 'likers': [{'pk': 40843950216, 'username': 'jangid_mahendra_0077', 'full_name': '', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/272044951_3151532145080890_8039253420465785801_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=110&_nc_ohc=e411HvH4F-4AX_2u7i0&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT8aYxaW8npTTA1HJ8EajgzYjMu-MFtfihLGCMuPPDl6bQ&oe=625A6D31&_nc_sid=83d603', 'profile_pic_id': '2753611017063197775_40843950216', 'is_verified': False, 'follow_friction_type': -1, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': []}, {'pk': 44931900829, 'username': 'frnd_jaan', 'full_name': 'jaanu🔵', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/277881792_407914971146773_4878599047040218559_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=101&_nc_ohc=3YZLxOWxrpAAX_0aSEv&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT88EqL1tpzupxLKyf0N5HamMTptt3PHtG8rmEn4Jx03vg&oe=625B856B&_nc_sid=83d603', 'profile_pic_id': '2810240202946905849_44931900829', 'is_verified': False, 'follow_friction_type': -1, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': []}], 'photo_of_you': False, 'is_organic_product_tagging_eligible': False, 'can_see_insights_as_brand': False, 'caption': {'pk': 17902493708485887, 'user_id': 52135199895, 'text': '#explorepage #sunsetphotography #sunset #samsunga20', 'type': 1, 'created_at': 1649696640, 'created_at_utc': 1649696640, 'content_type': 'comment', 'status': 'Active', 'bit_flags': 0, 'did_report_as_spam': False, 'share_enabled': False, 'user': {'pk': 52135199895, 'username': 'skies_by_jie', 'full_name': 'Skies✨', 'is_private': False, 'profile_pic_url': 'https://instagram.ftxl2-1.fna.fbcdn.net/v/t51.2885-19/275159678_635233907705714_3301720467448510435_n.jpg?stp=dst-jpg_s150x150&_nc_ht=instagram.ftxl2-1.fna.fbcdn.net&_nc_cat=102&_nc_ohc=TLWqsd_aLjEAX9ZS59D&edm=AABBvjUBAAAA&ccb=7-4&oh=00_AT95n96A9UqSUxqN3fF-sIjhk99P2OG4p3VixXOPeu01hQ&oe=625AEFBE&_nc_sid=83d603', 'profile_pic_id': '2786284984702872632_52135199895', 'is_verified': False, 'follow_friction_type': -1, 'growth_friction_info': {'has_active_interventions': False, 'interventions': {}}, 'account_badges': []}, 'is_covered': False, 'media_id': 2814181843960894852, 'private_reply_status': 0}, 'can_viewer_save': True, 'organic_tracking_token': 'eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjp0cnVlLCJ1dWlkIjoiNjE4Mzg5MzA1MjA1NGY5Y2FmYmQ1MDI1M2IzOWJiNDcyODE0MTgxODQzOTYwODk0ODUyIiwic2VydmVyX3Rva2VuIjoiMTY0OTY5Njc0MDUxOHwyODE0MTgxODQzOTYwODk0ODUyfDE3OTU1MzUwMzF8NmRjNzlmMzFjMjczYmQ1Y2E1ZDZmN2M1MmRkMTdmNDQxMDBjYjBjMDNhZGY1MzkwYzk5ODM2ZjkzYWQzNGY4MSJ9LCJzaWduYXR1cmUiOiIifQ==', 'has_shared_to_fb': 0, 'sharing_friction_info': {'should_have_sharing_friction': False, 'bloks_app_url': None, 'sharing_friction_payload': None}, 'comment_inform_treatment': {'should_have_inform_treatment': False, 'text': '', 'url': None, 'action_type': None}, 'product_type': 'feed', 'is_in_profile_grid': False, 'profile_grid_control_enabled': False, 'deleted_reason': 0, 'integrity_review_decision': 'pending', 'music_metadata': {'music_canonical_id': '0', 'audio_type': None, 'music_info': None, 'original_sound_info': None}}], 'num_results': 1, 'more_available': False, 'auto_load_more_enabled': False}

It does fetch the posts from the specified hashtags but as soon as it wants to like or comments (idk at what point it stops), it stops working and just says:

INFO [2022-04-11 19:05:43] [coldt_astrophotography]  Sessional Live Report:
        |> No any statistics to show

On session start was FOLLOWING 209 users & had 600 FOLLOWERS
[Session lasted 1.67 minutes]
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2022-04-11 19:05:43] [coldt_astrophotography]  Session ended!
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Traceback (most recent call last):
  File "C:\Users\xDDra\Downloads\instapy-quickstart-master\quickstart.py", line 124, in <module>
    session.like_by_tags(my_hashtags, amount=90, media=None)
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\site-packages\instapy\instapy.py", line 1977, in like_by_tags
    inappropriate, user_name, is_video, reason, scope = check_link(
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\site-packages\instapy\like_util.py", line 618, in check_link
    media = post_page[0]["shortcode_media"]
KeyError: 0
Press any key to continue . . .
--- Logging error ---
Traceback (most recent call last):
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\logging\__init__.py", line 1082, in emit
    stream.write(msg + self.terminator)
  File "C:\Users\xDDra\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]

Expected Behavior

Fetch posts from hashtags, like / comment and go on to other posts

Current Behavior

fetches posts from hashtags, goes to first post and then ends the program.

Possible Solution (optional)

InstaPy configuration

# general settings
   session.set_dont_like(['sad', 'rain', 'depression', 'food', 'selfie'])
    session.set_do_follow(enabled=True, percentage=70, times=1)
    session.set_do_comment(enabled=True, percentage=80)
    session.set_comments([
                             u'What an amazing shot! :heart_eyes: What do '
                             u'you think of my recent shot?',
                             u'What an amazing shot! :heart_eyes: I think '
                             u'you might also like mine. :wink:',
                             u'Wonderful!! :heart_eyes: Would be awesome if '
                             u'you would checkout my photos as well!',
                             u'Wonderful!! :heart_eyes: I would be honored '
                             u'if you would checkout my images and tell me '
                             u'what you think. :wink:',
                             u'This is awesome!! :heart_eyes: Any feedback '
                             u'for my photos? :wink:',
                             u'This is awesome!! :heart_eyes:  maybe you '
                             u'like my photos, too? :wink:',
                             u'I really like the way you captured this. I '
                             u'bet you like my photos, too :wink:',
                             u'I really like the way you captured this. If '
                             u'you have time, check out my photos, too. I '
                             u'bet you will like them. :wink:',
                             u'Great capture!! :smiley: Any feedback for my '
                             u'recent shot? :wink:',
                             u'Great capture!! :smiley: :thumbsup: What do '
                             u'you think of my recent photo?',
                             u'Nice shot! @{}',
                             u'I love your profile! @{}',
                             u'Your feed is an inspiration :thumbsup:',
                             u'Just incredible :open_mouth:',
                             u'What camera did you use @{}?',
                             u'Love your posts @{}',
                             u'Looks awesome @{}',
                             u'Getting inspired by you @{}',
                             u':raised_hands: Yes!',
                             u'I can feel your passion @{} :muscle:',
                             u'I wish I could pull that off',
                             u'So CLEAN. Damn...',
                             u'I love your feed! Followed! :D',
                             u'Leave some awesomeness for the rest of us. Dang..'],
                         media='Photo')
    session.set_do_like(True, percentage=70)
    session.set_delimit_liking(enabled=True, max_likes=100, min_likes=0)
    session.set_delimit_commenting(enabled=True, max_comments=20, min_comments=0)
    session.set_relationship_bounds(enabled=True,
                                    potency_ratio=None,
                                    delimit_by_numbers=True,
                                    max_followers=3000,
                                    max_following=2000,
                                    min_followers=50,
                                    min_following=50)

    session.set_quota_supervisor(enabled=True,
                                 sleep_after=["likes", "follows"],
                                 sleepyhead=True, stochastic_flow=True,
                                 notify_me=True,
                                 peak_likes_hourly=150,
                                 peak_likes_daily=400,
                                 peak_comments_hourly=80,
                                 peak_comments_daily=182,
                                 peak_follows_hourly=48,
                                 peak_follows_daily=None,
                                 peak_unfollows_hourly=35,
                                 peak_unfollows_daily=402,
                                 peak_server_calls_hourly=None,
                                 peak_server_calls_daily=4700)

    session.set_user_interact(amount=10, randomize=True, percentage=80)

    # activity
    session.like_by_tags(my_hashtags, amount=90, media=None)

    """ Joining Engagement Pods...
    """
    session.join_pods(topic='photography', engagement_mode='no_comments')
Ninikitos commented 2 years ago

Same here.

ghost commented 2 years ago

I had the same issue, apparently its due to instagram making changes to its source code.

I first uninstalled instapy in CMD(command prompt): py -m pip uninstall InstaPy

Then installed this version of InstaPy with the Fix already updated. I didn't feel like manually looking for the file and updating it. py -m pip install git+https://github.com/ErwinKoekoek/InstaPy.git@master

You can also have a look at this for more info: https://github.com/InstaPy/InstaPy/issues/6472

Also: Currently another issue is the follow and unfollow function, I've managed to find a fix for the follow button but nothing for the unfollow button

Anima1337 commented 2 years ago

I had the same issue, apparently its due to instagram making changes to its source code.

I first uninstalled instapy in CMD(command prompt): py -m pip uninstall InstaPy

Then installed this version of InstaPy with the Fix already updated. I didn't feel like manually looking for the file and updating it. py -m pip install git+https://github.com/ErwinKoekoek/InstaPy.git@master

You can also have a look at this for more info: #6472

Also: Currently another issue is the follow and unfollow function, I've managed to find a fix for the follow button but nothing for the unfollow button

Thank you, that did work. Do you mind sharing the fix for the following function also? Unfollow never worked for me anyway so I am used to manually unfollow

ghost commented 2 years ago

In the xpath_compile.py file change line 97 This: xpath["get_following_status"] = { "follow_button_XP": "//button[text()='Following' or \ text()='Requested' or \ text()='Follow' or \ text()='Follow Back' or \ text()='Unblock' and not(ancestor::*/@role = 'presentation')]", "follow_span_XP_following": "//button/div/span[contains(@aria-label, 'Following')]", }

To This: xpath["get_following_status"] = { "follow_button_XP": "//button/div[text()='Following' or \ text()='Requested' or \ text()='Follow' or \ text()='Follow Back' or \ text()='Unblock' and not(ancestor::*/@role = 'presentation')]", "follow_span_XP_following": "//button/div/span[contains(@aria-label, 'Following')]", }

You'll start getting this as a result, but it works: "Hey! Last follow is not verified out of an unexpected failure!"

Anima1337 commented 2 years ago

It says "Couldn't follow '[name]'! ~user is inaccessible" for me and it does not follow for me either

Anima1337 commented 2 years ago

image

ghost commented 2 years ago

Maybe its the way the code is structured, I'll just link the source for the solution instead. https://github.com/InstaPy/InstaPy/issues/6492

Anima1337 commented 2 years ago

Formatting does matter. Thought I did it right but I didn't. The first solution didn't work but the second did. Thanks a ton mate (:

benybens commented 2 years ago

Likes and Following are working with all these fixes on my side. Any news for the unfollow ?

Anima1337 commented 2 years ago

Sadly not from my side

wolf2000-hub commented 2 years ago

Likes and follow-ups work, but comments do not work !!!!! When I enable commenting, I get the same error Does anyone have a solution to this issue? thanks all Error : File "C:\Users\Ali\AppData\Local\Programs\Python\Python310\lib\site-packages\instapy\util.py", line 523, in getMediaData data = additional_data["graphql"]["shortcode_media"]

Chessy11 commented 2 years ago

Any news with unfollow?

wolf2000-hub commented 2 years ago

Any news with unfollow?

Not I just want the robot to like, follow and comment