mirror of
https://github.com/alexal1/Insomniac.git
synced 2026-04-26 18:15:54 +03:00
[GH-ISSUE #6] Infinite loop on IGTV #6
Labels
No labels
bug
duplicate
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Insomniac#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexal1 on GitHub (Jun 8, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/6
Cannot catch and replay this bug, maybe you guys have thoughts.
Sometimes IGTV fullscreen is accidentally being opened and then the script goes into infinite loop. It tries to find "search" button but can't. I have two questions:
open_instagram()function is called, it runsadb shell am start -n com.instagram.android/com.instagram.mainactivity.MainActivitycommand. Could you please check if this command returns you to the main screen while playing IGTV?@gvmturl @GabrieleAnsaldo @xerZV
@xerZV commented on GitHub (Jun 8, 2020):
@alexal1
I will try it tomorrow.
Yesterday I managed to run it successfully on my Windows PC with python 3. Had to refactor some print methods, etc etc.
Also I got "Actions blocked" but maybe because I was using --repeat 10.
I noticed that when you use only one blogger every time it starts from the beginning. Maybe we should think of something like "randomize scroll" so that can pick different followers instead of going over them from the beginning.
@GabrieleAnsaldo commented on GitHub (Jun 8, 2020):
Hi guys!
So here are some questions first:
@alexal1 At what moment does IGTV open? Could you elaborate on that?
Instead of using that command, you might want to use this
adb shell input keyevent KEYCODE_BACKwhich basically it emulates the return button to go back and close the IGTV page.Also @xerZV and @alexal1 I think we should implement like_by_hashtag because going on each person page requires quite a lot of time. Liking by hashtag is something that is faster, which means that Instagram will stay open for less time.
How I have it implemented now is:
@alexal1 commented on GitHub (Jun 8, 2020):
Well, thanks for your ideas, we'll implement them all, but the bug is still here and we need to handle it :)
@GabrieleAnsaldo
It happens when a post that contains IGTV is opened to like it. Sometimes (I don't know why) instead of liking it opens IGTV fullscreen.
When something goes wrong, the script catches
JsonRPCErrorfrom uiautomator. We don't exactly know on which screen we are, because potentially wrong action can happen everywhere. Thus we don't exactly know where we'll be after a backpress. That's why I want a universal solution to start from the beginning in this case.@alexal1 commented on GitHub (Jun 8, 2020):
@xerZV
I was thinking about it too. Random scroll is an unreliable solution. For a blogger with 10k and 100k followers mean number of scrolls should be different.
I can suggest following algorithm:
Let's call the case when all users on the screen already are interacted a "full interaction screen".
If we meet a full interaction screen, we make a scroll. If we meet it again, we make 4 scrolls. Then 9, 16, 25, etc until a not full interaction screen is met. With this solution we will miss part of users but speed will increase.
@alexal1 commented on GitHub (Jun 9, 2020):
Okay guys I committed
1a93d827fawhere@xerZV commented on GitHub (Jun 9, 2020):
Unfortunately Im still getting
Actions blocked. Maybe I should try to use another phone or? ANy ideas?@GabrieleAnsaldo commented on GitHub (Jun 9, 2020):
Hi @xerZV , I have a very dirty way of solving this problem. Firstly, make sure that you don’t like too many posts per session. As an example I like about 300 posts per session and I have 6 to 7 sessions a day.
Secondly, if you want to remove the block what you can do is to delete the user data cache and log in again to Instagram. To do so you can simply use the adb command: adb shell pm clear com.instagram.android. However you have to make sure to log in again to your Instagram account and accept the warnings such as “instagrams would like to access your location etc.”
@alexal1 commented on GitHub (Jun 11, 2020):
@xerZV I refused of quadratic steps to speed up scrolling followers: it's unexpected behavior for some users. Instead I worked on optimization:
a1da48e5cb. Now it checks each user in the list always, but doesn't wait for 3-4 seconds at the end of the list.git pullto get current version please.