Instapy: A 'temporary block' issue with UnFollowing.

Created on 19 Feb 2019  路  31Comments  路  Source: timgrossmann/InstaPy

I keep getting this message while trying to run an UnFollow script.

"INFO [2019-02-19 10:55:00] [**] Ongoing Unfollow [11/72]: now unfollowing 'b'**''...
WARNING [2019-02-19 10:56:17] [**] Phew! Last unfollow is not verified. ~'**' might be temporarily blocked from unfollowing

WARNING [2019-02-19 10:59:22] [**] There is a serious issue: 'temporary block'! ~leaving Unfollow-Users activity
INFO [2019-02-19 10:59:22] [**] --> Total people unfollowed : 10"

My "session.unfollow_users" is set to 300, But due to all the settings I have put in place it only unfollows less then 100 at a time.
I know that I am not ShadowBanned or Blocked from Unfollowing cuz I can still unfollow people on my Phone and on my Laptop. Plus when I shutdown the program and immediately run it again it will give the same message after unfollowing a few profiles.
I have looked up this type of issue from the past and due to the major Instapay update all solutions that are given are confusing and do not offer a solution now.
If anyone is familiar with this issue and the new updates to instapy your help will be greatly appreciated.
Thank you.

wontfix

All 31 comments

I have that same problem

I have also the same issue ..

I am also getting the same issue

@timgrossmann unfollow not working

Unfollow non-followers seems to be working fine (for me) but unfollow from 'customList' is when I get the temporary block warning...

I've also been having this issue, looks like it's been around for a couple weeks.

It doesn't look like an actual temporary block, because I'm able to click the unfollow button to successfully.

It looks like when the unfollow window that pops up it doesn't successfully click the unfollow button. Not sure if it's a timing thing? Will attempt testing with a longer wait.

Open to any other suggestions.

Same here.. any update?

Tried with changing waits, it didn't make a difference. Can't seem to figure out why it doesn't click the "Unfollow" in the confirmation dialog.

@timgrossmann, @sionking , @uluQulu thoughts on things to try to fix unfollow_users?

It looks like the following line of code in the confirm_unfollow function from unfollow_util, doesn't seem to register the unfollow_button, even though it's actually there.

            if unfollow_button.is_displayed():
                click_element(browser, unfollow_button)
                sleep(2)
                break

I added the follow line of code to attempt to click the button regardless, and it seems to have fixed it.

            else:
                try:
                    click_element(browser, unfollow_button)

code failed

except in line

File "/Users/gezgin/InstaPy/instapy/unfollow_util.py", line 1345

        if unfollow_button.is_displayed():
            click_element(browser, unfollow_button)
            sleep(2)
            break

        else: 
            try: click_element(browser, unfollow_button)

    except (ElementNotVisibleException, NoSuchElementException) as exc:
        # prob confirm dialog didn't pop up
        if isinstance(exc, ElementNotVisibleException):
            break

        elif isinstance(exc, NoSuchElementException):
            sleep(1)
            pass

your tab spacing is probably the issue.
the click_element should be on the next line and indented one space from the try

@vibhuarul
I can not run.

Can you email me the unfollow_util.py file?

mehmetali.[email protected]

I added below code, it seems to be working fine.

`else:
try:
click_element(browser, unfollow_button)

            except (ElementNotVisibleException, NoSuchElementException) as exc:
            # prob confirm dialog didn't pop up
                if isinstance(exc, ElementNotVisibleException):
                    break

                elif isinstance(exc, NoSuchElementException):
                    sleep(1)
                    pass`

The code does not fail for me. However, the error is still there. Any thoughts?

@CharlesCCC any idea of this warning? same issue here #3664 . Kind regards.

dear all, as it cleared said from the message "temporary block" ...

from the OP, 100 at a time still a lots. depend on how often you run, let's say if you run 10 times a day, that is 1000 unfollows, Instagram automatically trigger the flag and set you account as suspicious and block. The only way and simplest way to resolve it just to reduce the amount of activities.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

Seems that the problem is still there..

WARNING [2019-05-15 12:20:13] [gevor] Phew! Last unfollow is not verified. ~'gevor' might be temporarily blocked from unfollowing
WARNING [2019-05-15 12:23:28] [gevor] There is a serious issue: 'temporary block'! ~leaving Unfollow-Users activity
INFO [2019-05-15 12:23:28] [gevor] --> Total people unfollowed : 0

That's an error I get trying to unfollow. I'm running with headless_browser=False so I can see what's going on. There is an unfollow confirmation window popup, which instapy doesn't seem to register. I can manually click the unfollow button, which works perfectly. So my assumption is that I am not blocked.

your tab spacing is probably the issue.
the click_element should be on the next line and indented one space from the try

@vibhuarul I'm having hard time inserting your code into unfollow_util.py Can you please send me your file or the code with correct formatting? Thanks

@hetasanghvi It looks like it worked in your case. I can't get that piece of code to work for me. I get "unexpected unindent" error. Could you please send me the correct code or the entire unfollow_util.py file? [email protected]

Thanks!

dear all, as it cleared said from the message "temporary block" ...

from the OP, 100 at a time still a lots. depend on how often you run, let's say if you run 10 times a day, that is 1000 unfollows, Instagram automatically trigger the flag and set you account as suspicious and block. The only way and simplest way to resolve it just to reduce the amount of activities.

This is not true. If you manually try, it works. It's just the bot failing to perform the action and assuming there is a block.

@y2kappa Perform the action, and "refresh" the page. to see if the action(like/follow) still there.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

i got same problem. InstaPy sad : Phew! Last unfollow is not verified
But i can unfollow from my device easily!
So, that's a bug.. ?

I run InstaPy on Windows. With headless firefox

Tengo el mismo problema se esta bloqueado desde el instapy, pero en el cel funciona perfecto

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

Have same behavior when hide browser (use mac os) or turn on video on full screen, error (There is a serious issue: 'temporary block') appears cause unfollow popup does not appear and instapy shuts down

Same here, i麓ve set an amount of 50 unfollows, with a sleeping delay of 120 and a peak of 15 unfollows per hour but I keep getting this message, even when it just made 1 unfollow, the next is returning this error.

Anyone got any news here?

I am also getting the same issue

As mentioned previously I find the problem was with the confirm_unfollow function - replace this with that (added a bit more try/except)

def confirm_unfollow(browser):
    """ Deal with the confirmation dialog boxes during an unfollow """
    attempt = 0

    while attempt < 3:
        try:
            attempt += 1
            button_xp = read_xpath(
                confirm_unfollow.__name__, "button_xp"
            )  # "//button[contains(
            # text(), 'Unfollow')]"
            unfollow_button = browser.find_element_by_xpath(button_xp)

            if unfollow_button.is_displayed():
                click_element(browser, unfollow_button)
                sleep(2)
                break
            else:
                try:
                    click_element(browser, unfollow_button)
                except (ElementNotVisibleException, NoSuchElementException) as exc:
                    if isinstance(exc, ElementNotVisibleException):
                        break 

        except (ElementNotVisibleException, NoSuchElementException) as exc:
            # prob confirm dialog didn't pop up
            if isinstance(exc, ElementNotVisibleException):
                break

            elif isinstance(exc, NoSuchElementException):
                sleep(1)

As mentioned previously I find the problem was with the confirm_unfollow function - replace this with that (added a bit more try/except)

def confirm_unfollow(browser):
    """ Deal with the confirmation dialog boxes during an unfollow """
    attempt = 0

    while attempt < 3:
        try:
            attempt += 1
            button_xp = read_xpath(
                confirm_unfollow.__name__, "button_xp"
            )  # "//button[contains(
            # text(), 'Unfollow')]"
            unfollow_button = browser.find_element_by_xpath(button_xp)

            if unfollow_button.is_displayed():
                click_element(browser, unfollow_button)
                sleep(2)
                break
            else:
                try:
                    click_element(browser, unfollow_button)
                except (ElementNotVisibleException, NoSuchElementException) as exc:
                    if isinstance(exc, ElementNotVisibleException):
                        break 

        except (ElementNotVisibleException, NoSuchElementException) as exc:
            # prob confirm dialog didn't pop up
            if isinstance(exc, ElementNotVisibleException):
                break

            elif isinstance(exc, NoSuchElementException):
                sleep(1)

This work for me. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deronsizemore picture deronsizemore  路  3Comments

converge picture converge  路  3Comments

tibor picture tibor  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments

neomh picture neomh  路  3Comments