kennethkn / instagram-activities-wipe

Wipe Instagram comments/likes with Selenium Python
MIT License
23 stars 1 forks source link

error on delete #1

Open 65156 opened 3 months ago

65156 commented 3 months ago
Screenshot 2024-03-16 at 8 20 53 p m

everything looks good but it seems to error out while its deleting?

del-all-ig-comments: Looking for comments...
del-all-ig-comments: Comments loaded
del-all-ig-comments: Selected a comment for deletion (Total: 1)
del-all-ig-comments: Selected a comment for deletion (Total: 2)
del-all-ig-comments: Selected a comment for deletion (Total: 3)
del-all-ig-comments: Selected a comment for deletion (Total: 4)
del-all-ig-comments: Selected a comment for deletion (Total: 5)
del-all-ig-comments: Selected a comment for deletion (Total: 6)
del-all-ig-comments: Selected a comment for deletion (Total: 7)
del-all-ig-comments: Selected a comment for deletion (Total: 8)
del-all-ig-comments: Selected a comment for deletion (Total: 9)
del-all-ig-comments: Selected a comment for deletion (Total: 10)
del-all-ig-comments: Selected a comment for deletion (Total: 11)
del-all-ig-comments: Selected a comment for deletion (Total: 12)
del-all-ig-comments: Selected a comment for deletion (Total: 13)
del-all-ig-comments: Selected a comment for deletion (Total: 14)
del-all-ig-comments: Selected a comment for deletion (Total: 15)
del-all-ig-comments: Selected a comment for deletion (Total: 16)
del-all-ig-comments: Selected a comment for deletion (Total: 17)
del-all-ig-comments: Selected a comment for deletion (Total: 18)
Message: stale element reference: stale element not found
  (Session info: chrome=122.0.6261.129); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
Stacktrace:
0   chromedriver                        0x0000000102d64524 chromedriver + 3966244
1   chromedriver                        0x0000000102d5cab0 chromedriver + 3934896
2   chromedriver                        0x00000001029dfda0 chromedriver + 277920
3   chromedriver                        0x00000001029e4648 chromedriver + 296520
4   chromedriver                        0x00000001029e5fe0 chromedriver + 303072
5   chromedriver                        0x00000001029e6078 chromedriver + 303224
6   chromedriver                        0x0000000102a1d500 chromedriver + 529664
7   chromedriver                        0x0000000102a188a8 chromedriver + 510120
8   chromedriver                        0x0000000102a5abf0 chromedriver + 781296
9   chromedriver                        0x0000000102a16fb0 chromedriver + 503728
10  chromedriver                        0x0000000102a17a28 chromedriver + 506408
11  chromedriver                        0x0000000102d2970c chromedriver + 3725068
12  chromedriver                        0x0000000102d2dc00 chromedriver + 3742720
13  chromedriver                        0x0000000102d121f4 chromedriver + 3629556
14  chromedriver                        0x0000000102d2e6fc chromedriver + 3745532
15  chromedriver                        0x0000000102d0556c chromedriver + 3577196
16  chromedriver                        0x0000000102d4cf5c chromedriver + 3870556
17  chromedriver                        0x0000000102d4d100 chromedriver + 3870976
18  chromedriver                        0x0000000102d5c720 chromedriver + 3933984
19  libsystem_pthread.dylib             0x000000018229a034 _pthread_start + 136
20  libsystem_pthread.dylib             0x0000000182294e3c thread_start + 8

(venv) frankie@elysium delete-instagram-comments-likes % python3 --version Python 3.12.2

let me know if you need any other info.

kennethkn commented 3 months ago

Hi there! Thanks for letting me know. I looked into the issue while working on a new script to delete likes and ran into the same error.

Screenshot 2024-03-17 at 14 01 33

I found that this is likely due to a rate-limiting restriction from Instagram, where you cannot delete too many comments/likes at once. So, even if you try to delete the comments manually now, chances are you would get the same error. The only solution now is to wait a few hours or even a day before rerunning the script.

Also, the current version of the script requires logging in every time it runs, which could raise suspicion with Instagram if it's run frequently enough. Therefore, I advise against running the script repeatedly. However, an update is coming that will let you stay logged in and handle more error scenarios. Update: I have pushed an update that lets you stay logged in, making the script much safer by avoiding suspicion due to repeated logins in a short period of time.

I will keep the issue open in case others have more insights regarding the error.

PacksInHiding commented 3 months ago

Hey there, getting this error after your update. Changed nothing, besides updating the files. Worked flawlessly ( besides getting rate limited ) before. Thanks for the script btw

del-all-ig-comments: Script started Message: unknown error: cannot create default profile directory Stacktrace: GetHandleVerifier [0x00007FF73FC3AD02+56930] (No symbol) [0x00007FF73FBAF602] (No symbol) [0x00007FF73FA642E5] (No symbol) [0x00007FF73FA989F4] (No symbol) [0x00007FF73FA95186] (No symbol) [0x00007FF73FA905D4] (No symbol) [0x00007FF73FAD595F] (No symbol) [0x00007FF73FAD54C0] (No symbol) [0x00007FF73FACBA43] (No symbol) [0x00007FF73FA9D438] (No symbol) [0x00007FF73FA9E4D1] GetHandleVerifier [0x00007FF73FFB6F8D+3711213] GetHandleVerifier [0x00007FF7400104CD+4077101] GetHandleVerifier [0x00007FF74000865F+4044735] GetHandleVerifier [0x00007FF73FCD9736+706710] (No symbol) [0x00007FF73FBBB8DF] (No symbol) [0x00007FF73FBB6AC4] (No symbol) [0x00007FF73FBB6C1C] (No symbol) [0x00007FF73FBA68D4] BaseThreadInitThunk [0x00007FF92F427344+20] RtlUserThreadStart [0x00007FF9307226B1+33]

del-all-ig-comments: Web driver could not start. Have you installed ChromeDriver? Check README for details. del-all-ig-comments: Quitting...

kennethkn commented 3 months ago

Yea, then it looks like rate limits are indeed a thing. Thanks for your info @PacksInHiding. Regarding your issue, I seem to have pushed faulty code for Windows users earlier. The issue should be resolved now. I am glad the script works for you 😄

65156 commented 3 months ago

also same error on my phone...weird, definitely rate and daily cap limited now.

65156 commented 3 months ago

have you seen this?

https://developers.facebook.com/docs/instagram-api/guides/comment-moderation/

you can make use of these on the account, after you switch your instagram account to a business account.

kennethkn commented 3 months ago

Interesting... I haven't seen this before. But I just did some brief research about it, and it seems that using this API involves me registering an app with Facebook. You, as the users, would then log in via Facebook to my app and grant me permissions specifically related to managing comments and likes (e.g. instagram_manage_comments). Afterward, my app would make API calls to batch delete comments/likes for you when you click on a button or something similar.

This could work, but it will take some time to implement given it involves engaging with Facebook. Additionally, whether Facebook would approve a dedicated app for deleting comments and likes is something that needs to be figured out. Thanks for the idea!

65156 commented 3 months ago

can we create our own apps and own app permissions, I did this for a twitter delete tool, its a bit of a process, but was worth it; basically you request a dev account for specific testing on your data only; then im basically just passing a bunch of api keys and secrets into the script to grant permission against my app.

facebook should be able to grant this to anyone, thats the easiest route.

https://github.com/Mayur57/twitter-nuke

65156 commented 3 months ago

oh cool, look at this

https://github.com/facebookarchive/python-instagram