2

I've installed Instapy dependency from https://pypi.org/project/instapy/ and I really enjoyed it. There are two operations I really can't figure out why it's not working, I've followed the oficial documentation to do it, youtube videos and it isn't working.

Actually the warning message says the user is not acessible, but I don't know why, every user happen this, so I can't unfollow the unfollowers:

INFO [2022-02-11 20:05:41] [gorilafreela]  Ongoing Unfollow [1/3]: now unfollowing 'b'antonio_fpessoa''...
WARNING [2022-02-11 20:06:35] [gorilafreela]  --> Couldn't unfollow 'antonio_fpessoa'!  ~user is inaccessible

The same issue happen if I try to follow someone new, happens the same warning I said before.

import json
from instapy import InstaPy
from instapy import smart_run
import userData
import util
from selenium import webdriver

# data
userInfo = userData.getUserPassword()

# session
session = InstaPy(username=userInfo['user'], password=userInfo['password'])
session.login()

session.unfollow_users(amount=3,nonFollowers=True,unfollow_after=10,sleep_delay=60)
session.end()

Anyone has any ideia how can I fix this problem.

Adriel Kirch
  • 151
  • 2
  • 12

2 Answers2

0

A fix can be found in the following link

Zeca
  • 71
  • 1
  • 1
  • 12
  • but this issue hasn't been closed yet, I hope they're gonna solve it soon – Adriel Kirch Feb 16 '22 at 16:22
  • After Tim being almost sued it by FB to stop working on it and IG changing a good part of it is data structure afterwards, I don't know how quickly the community will be able to fix the latest issues. – Zeca Feb 19 '22 at 14:36
0

Ok it works modifying xpath_compile.py file with :

xpath["get_following_status"] = {
"follow_button_XP": "//button**/div/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')]",

}

The issue was cause by IG changes in format of the "Follow" button. It was a <button>Follow</button> format and now it seems to be a <button><div><div>Follow</div></div></button> which the bot has to locate...

Robz
  • 11
  • 2